Trailing Sell — Strategy by jason5480

By freyadog

Performance Metrics

Description

Feb 24, 2022This script demonstrates how to do trailing sell. With this approach, given an exit signal, instead of selling directly, you just follow the price upwards (for long positions) and you sell when the price decreases by a small percentage. The order will be executed when the next bar is closed. This approach may increase the profits (slightly) in some strategies! This script can be used as a template for your own strategy. Be aware that the simulated data may produce unrealistic results.Jun 30, 2022Release NotesUse stop orders when trailing instead of market orders at the start of the next candle (suggestion by freyadog)Use time_filter library Jul 2, 2022Release NotesMinor code clean upChange color schemeJul 3, 2022Release NotesUpdate time_filters libraryJul 9, 2022Release NotesReplace deprecated "when=" with if statements in strategy callsJul 13, 2022Release NotesChange fastMA default color to yellowJul 29, 2022Release NotesIncrease max labels to 150Minor refactoringAug 9, 2022Release NotesUpdate time_filters librarySep 2, 2022Release NotesChange the settings so the order type (market, stop-limit) is independent from the trailingMake exit trailing to cancel on open signalSome minor label/color changesSep 28, 2022Release NotesAdded option for limit ordersJan 10, 2023Release Notessmall refactoringJan 17, 2023Release NotesUpdate time_filters library versionFix settings broken layoutMar 19, 2023Release Notes Update time_filters library versionNov 23, 2023Release NotesUse the 'chrono_utils' library for the date-time window filterSep 19, 2024Release Notes Add different alert messages per event Update 'chrono_utils' library Use enumMar 1Release Notes Update to pinescript version 6

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView