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 protegido
Esse script é publicada como código fechado. No entanto, você pode usar ele livremente e sem nenhuma limitação – saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode usar ele livremente e sem nenhuma limitação – saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.