okadoke

ATR Trailing Stops Strategy

okadoke Updated   
Update of Average True Range Trailing Stops Strategy by HPotter to include backtesting support

  • Opens longs when price crosses over trailing stop line, closes when price crosses below
  • Option to open/close shorts when longs are closed/opened
  • Option to specify a time range to test over. For example, set Max Days Back to 360 and Min Days Back to 180 to test from 1 year ago to 6 months ago. To test the entire range of data, set both to 0.
Release Notes:
Fixed long/short switching
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?