Trailing Take Profit — Strategy by jason5480

By jason5480

Performance Metrics

Description

Apr 17, 2021This script demonstrates how to do trailing take profit. With this approach instead of setting a limit order, when you hit the target you just follow the price upwards (for long positions) and you sell when the price drops by a small percentage. This approach will increase the profits (slightly) in every strategy! Be aware that the simulated data may produce unrealistic results.May 3, 2021Release NotesAdd min and max input valSimplify the strategy order commandsSimplify long Take profit price plot commandMay 4, 2021Release NotesUse close source to define the profit priceSet offset to the plot of TP priceMay 24, 2021Release NotesCheck if time is within backtest period to prevent unecesary calculation and print inside the area of interestReplace deprecated transp argument with color.newAug 7, 2021Release NotesUse strategy.percent_of_equityDraw lines with width 1Oct 11, 2021Release NotesUpdate pinescript to V5Take profit step to 0.05 deviation to 0.01Transparency deprecation fixNov 28, 2021Release NotesLet's face it a Green-Red color model is more intuitive!Jan 1, 2022Release NotesHappy New Year!Many code refactorings and optimizations to better use this script as a template and plug your own strategy at easeJan 12, 2022Release Notes(minor) refactoringJul 3, 2022Release NotesUse time_filters libraryJul 3, 2022Release NotesMinor revision updateJul 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 150Increase max lines to 150Minor refactoringAug 9, 2022Release NotesUpdate time_filters librarySep 2, 2022Release NotesSome minor label/color changesJan 10, 2023Release Notessmall refactoringJan 17, 2023Release NotesUpdate time_filters library versionMar 19, 2023Release Notes Update time_filters library versionNov 30, 2023Release NotesUse the 'chrono_utils' library for the date-time window filterSep 17, 2024Release Notes Add different alert messages per event Update 'chrono_utils' libraryMar 1Release NotesUpdate to pinescript version 6

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView