OPEN-SOURCE SCRIPT

Mbah Mul Reversal

Inputs:

showCRB1 and showCRB2 are boolean inputs to toggle the display of CRB1 (Bearish Reversal) and CRB2 (Bullish Reversal) signals.
numCandles is an integer input to specify the number of candles to consider.
Historical Data:

The script retrieves the previous candle's open, close, high, and low prices using request.security.
CRB1 (Bearish Reversal):

Checks if the previous candle was bullish (close_prev > open_prev).
Checks if the current high is higher than the previous high.
Checks if the current close is within a specific range or lower than the previous open.
If all conditions are met, it places a "SELL" label above the current high.
CRB2 (Bullish Reversal):

Checks if the previous candle was bearish (close_prev < open_prev).
Checks if the current low is lower than the previous low.
Checks if the current close is within a specific range or higher than the previous open.
If all conditions are met, it places a "BUY" label below the current low.
Bill Williams IndicatorsCandlestick analysisChart patterns

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer