PROTECTED SOURCE SCRIPT
ATR-Based Stop Loss & TP (Last Bar Only, Styled, Dynamic RR)

ATR-Based SL/TP (Last Bar Only, Styled, Dynamic RR)
This indicator calculates SL and TP levels based on the 30-bar Average True Range (ATR) and displays them as horizontal lines on the chart.
Features:
- Separate SL and TP lines for Long and Short positions.
- Long SL: red solid line
- Long TP: green solid line
- Short SL: red dashed line
- Short TP: green dashed line
- Lines extend to the right, based on the last bar only.
- Labels are displayed to the right of the lines and remain fixed.
- Risk:Reward ratio (R:R) is adjustable via input.
Inputs:
- ATR Length: period used for ATR calculation
- ATR Multiplier: ATR multiplier for SL/TP distance
- Bars for Average ATR: number of bars to calculate average ATR (default: 30)
- Risk:Reward: desired R:R ratio
- Label Right Offset Bars: number of bars to shift the label to the right for better visibility
Usage: Visualizes SL and TP levels for the last bar only. Lines and labels update automatically with each new bar.
This indicator calculates SL and TP levels based on the 30-bar Average True Range (ATR) and displays them as horizontal lines on the chart.
Features:
- Separate SL and TP lines for Long and Short positions.
- Long SL: red solid line
- Long TP: green solid line
- Short SL: red dashed line
- Short TP: green dashed line
- Lines extend to the right, based on the last bar only.
- Labels are displayed to the right of the lines and remain fixed.
- Risk:Reward ratio (R:R) is adjustable via input.
Inputs:
- ATR Length: period used for ATR calculation
- ATR Multiplier: ATR multiplier for SL/TP distance
- Bars for Average ATR: number of bars to calculate average ATR (default: 30)
- Risk:Reward: desired R:R ratio
- Label Right Offset Bars: number of bars to shift the label to the right for better visibility
Usage: Visualizes SL and TP levels for the last bar only. Lines and labels update automatically with each new bar.
Script protégé
Ce script est publié en source fermée. Toutefois, vous pouvez l'utiliser librement et sans aucune restriction - en savoir plus ici.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script protégé
Ce script est publié en source fermée. Toutefois, vous pouvez l'utiliser librement et sans aucune restriction - en savoir plus ici.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.