All indicators

Role Reversal Detection Alert [MsF]

Mar 6, 2023

Static chart image
Support and ResistanceSignals

The Role Reversal Detection Alert [MsF] indicator is a specialized monitoring tool designed to identify and alert traders when price action confirms a support-to-resistance or resistance-to-support flip. It automates the observation of horizontal levels, ensuring users do not miss high-probability rebound setups commonly found in double top or double bottom patterns.

Usage

The script is primarily used to track potential role reversal setups around a user-defined price level. It operates on a two-step confirmation logic:

  1. Touch Phase: The price (including candle wicks) must first touch or penetrate the primary horizontal support/resistance line within a specified lookback period.
  2. Breakout Phase: After the initial touch, an alert is triggered only when a candle body closes beyond a secondary "alert judgment" band.

This mechanism filters out premature signals, requiring the market to demonstrate a clear rejection and subsequent momentum away from the level.

Details

The indicator constructs three visual reference lines:

  • Base Line: The primary horizontal price level where the "role reversal" is expected to occur.
  • Upper/Lower Bands: Offset lines calculated based on a pip range from the base line. These serve as the threshold for the alert judgment.

The logic incorporates a lookback window (defaulting to 18 bars) to check for the initial touch of the base line. For a long setup, the price must have dropped to or below the base line before closing above the upper band. For a short setup, the price must have risen to or above the base line before closing below the lower band.

Settings

  • Input Horizontal Value: Sets the specific price level for the main horizontal base line.
  • Band Range by pips: Determines the distance (in pips) from the base line to the secondary alert judgment lines.
  • Line Color/Width: Customizes the visual appearance of the primary base line.
  • Band Color/Width: Customizes the visual appearance of the upper and lower offset bands.

FAQ

How do I set up an alert for this indicator? You can use the built-in TradingView alert menu and select "Role Reversal Detection Alert [MsF]" as the condition. The script includes pre-configured alert conditions for both Long and Short role reversals.

What timeframe is best for detecting role reversals? While the indicator works on any timeframe, it is most commonly used on higher timeframes (like 1H, 4H, or Daily) where horizontal levels carry more historical significance.

How can I access Role Reversal Detection Alert [MsF]? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.