OPEN-SOURCE SCRIPT

ATR+ (Stop Loss Indicator)

Updated
This script is designed to aid in back-testing and trade execution.

It displays three sets of values - the teal colored value is the current ATR, the green colored value is your stop loss distance (in pips) below the most recent swing low for long trades, and the red colored value is your stop loss distance (in pips) above the most recent swing high for short trades.

You can change the stop loss settings to base your stop loss on a set pip amount or by however many multiples of the current ATR as you wish (eg. 1.5x ATR).

Feel free to ask any questions or edit the script without permission :)

- Matt.
Release Notes
Minor improvements
Release Notes
Converted ATR and S/L into whole numbers.
Added optional T1 (Profit Target).
Release Notes
Minor improvements to display chart.
Release Notes
Minor improvements.
Release Notes
Converted to Pine Script v4 and cleaned up code to remove unnecessary lines.
Release Notes
Fixed to work on all markets (previously was bugged on some markets)
Release Notes
Updated to Pine Script v5
ATRAverage True Range (ATR)LONGlossshortstoptrendTrend AnalysisVolatility Stop

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


My Resources Hub: theartoftrading.com
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
Also on:

Disclaimer