Trailing Stop Snippet

This is an example snippet that should allow for adding a trailing stop and trailing stop activation to almost any script.

You can use it by setting a trailing stop alone. This will provide you standard trailing stop functionality allowing you to lock in profits and increase your stop-loss as the price moves in your direction.

You can also set the trailing stop activation to trigger the original trailing stop at a certain level. "Once price rises 5%, set a trailing stop at break even". This would be set as 5 and 5 in the settings.


本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。