PINE SCRIPT CODE FOR ATR TRAILING STOP-LOSS
Several years ago I came across a website as I was searching for coding a trailing stop-loss on MetaStock. A website called Trader Nexus helped me to better understand what a Chandelier Exit is with several great examples and some sort of a plug in DLL specifically designed for MetaStock formula language. Over the years I made some modifications to the ATR based trailing stop-loss.
Recently I spent couple of long hours on Trading View to understand and formulate the similar ATR based trailing stop by using their formula language, pine script. I think I was able to plot the indicator and I’m sharing it here with out members. I plan to integrate more and more Trading View functionalities to Tech Charts reports and website.
If you are interested in giving the platform a try here is your discounted link (Try Trading View with an initial discount)
I named it Simplified ATR Trailing Stop because so much more can be done with it by adding different calculations, such as price projections based on the initial risk etc. I will continue to build on this in the following posts. Let’s look at the below box for parameters.