OPEN-SOURCE SCRIPT

Trend Reversals(Mastersinnifty)

238
Description
The Trend Reversals (Mastersinnifty) indicator highlights potential turning points in price direction using an ATR-based trailing stop mechanism. It provides clear trend reversal signals on the chart to help traders identify possible entry or exit points based on price behavior and volatility.

How It Works
This indicator applies a custom trailing stop logic inspired by SuperTrend-style mechanisms. It uses the Average True Range (ATR) to dynamically calculate upper and lower stop levels and monitors for price breaches that may indicate a shift in trend direction.

Trend change signals are plotted using conditional logic that compares price behavior against trailing levels, with labels appearing:

Below candles for bullish reversals

Above candles for bearish reversals

Inputs
  • Value for trend change – Threshold in % used to filter valid reversal signals.
  • ATR Periods – Number of bars for ATR calculation (internally fixed at 1 in the script).
  • Multiplier – Determines the sensitivity of the trailing bands (set internally).
  • Change ATR Type – Allows switching between standard ATR and SMA-based True Range.


Use Case
This tool is ideal for:
  • Spotting trend reversals early in intraday or swing trades.
  • Filtering false breakouts using volatility-adjusted thresholds.
  • Combining with other indicators like volume or oscillators for confirmation.
  • Use on trending instruments to ride swings more efficiently.


Disclaimer
This indicator is a technical analysis tool and does not guarantee any specific outcome. Always use with proper risk management and in conjunction with other forms of analysis. The author is not responsible for any financial losses incurred through the use of this script.

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.