theCrypster

Percent Trailing Stop (%) - For Study Scripts

theCrypster 已更新   
===========
Percent Trailing Stop (%) - { FOR STUDY SCRIPTS }
===========

Wow - this is an example of how to implement Alerts relating to a Trailing Stop (%) within your Study Script. It's taken a bit of effort to get this working but I think we got there!

Alerts include Open Long/Short, Trailing Stop Hit, and (the most important one) Movement of Trailing Stop! <- this is actually really quite good, by the way! :)

You can ignore the actual entry/exit orders - they're based on a simple MA cross and are therefore NOT relevant, NOT profitable and NOT recommended!

You should be using this code as a way of adding a Trailing Stop to your own scripts - hope it helps!

Set your "Open Long/Short" Alert to "Once per Bar Close" - Set your "Trailing Stop Hit" Alert to "Once per Bar" - Set your "Move TSL" Alert to "Once per Bar Close". - You're all done! Enjoy.

-----------

Good Luck and Happy Trading!
發布通知:
UPDATE - Added "plot numbers" instead of plot names to give Alerts more consistent values when triggered.

開源腳本

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

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?