OPEN-SOURCE SCRIPT

False Breakouts

619
Indicator that detects the three types of false breakouts

Here's how the script works:

1.Defining Levels: The script uses Pivot Highs for resistance levels and Pivot Lows for support levels. You can adjust the "Pivot Left Length" and "Pivot Right Length" in the settings to define how significant a level needs to be.

2.Simple False Breakout (Single Bar): A shape is plotted when the price wicks through a level (high breaks resistance or low breaks support) but manages to close back on the previous side.

3.Two-Bar False Breakout: Plotted when a candle breaks and closes past a level, but the very next candle reverses and closes back inside the previous boundary.

4.Multi-Bar False Breakout: Plotted when the price breaks and holds beyond a level for a few bars (up to a limit set by the Max Hold Bars input) before sharply reversing and closing back inside.
The script visually maps the active support and resistance levels using dashed gray lines, and false breakouts are labeled with distinct shapes and color variations to distinguish whether they are single, two-bar, or multi-bar occurrences.

Have added RSI confirmation to the indicator's logic!

Here is what was updated:

RSI Settings: You will now see a new "RSI Confirmation" group in the indicator settings. This allows you to enable or disable the RSI check, as well as adjust the RSI Length, Overbought, and Oversold levels.
Confirmation Logic:
-If enabled, a Bearish False Breakout will only be flagged if the RSI value on the signal bar is greater than or equal to the Overbought level (default 70).
-A Bullish False Breakout will only be flagged if the RSI value is less than or equal to the Oversold level (default 30).
-If you disable the "Require RSI Confirmation" setting, it will behave exactly as it did before.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.