OPEN-SOURCE SCRIPT
Bob Clean Signals

Bob Clean Signals marks pullback entries into market structure and into two
user-defined session ranges.
HOW IT WORKS
1. Structure zone: the script tracks the most recent confirmed pivot high and
pivot low (ta.pivothigh / ta.pivotlow, symmetrical length). When price closes
beyond one of them, that break defines a zone spanning the two pivots, and
the trend is set bullish or bearish. The zone is discarded when price closes
through the opposite side, or after N bars.
2. Session zones: at two configurable New York times (default 09:00 and 15:00),
the high and low of that bar become a range. The range only arms once price
has closed outside it.
3. Entry: price must retrace back into a zone between the Min and Max Pullback
levels (measured as a fraction of the zone's height), and the bar must close
as a rejection candle in the trend direction. A cooldown enforces a minimum
bar spacing between signals.
SETTINGS
Pivot Length — lookback each side for pivot confirmation.
Min / Max Pullback % — the retracement band that counts as a valid entry.
Invalidate Zone After N Bars — age limit on a structure zone.
First Touch Only — allow one signal per structure zone.
Zone 1 / Zone 2 Hour and Minute — session times in New York time.
Only Session Signals — suppress structure-based signals.
Min Bars Between Signals — cooldown.
NOTES
Session zones require an intraday chart. Pivots confirm Pivot Length bars after
they form, so a zone appears only after that confirmation; signals are evaluated
on the live bar and are final at bar close.
This is an indicator, not a strategy, and it does not backtest or measure
performance. It is for study and chart annotation only and is not financial
advice.
user-defined session ranges.
HOW IT WORKS
1. Structure zone: the script tracks the most recent confirmed pivot high and
pivot low (ta.pivothigh / ta.pivotlow, symmetrical length). When price closes
beyond one of them, that break defines a zone spanning the two pivots, and
the trend is set bullish or bearish. The zone is discarded when price closes
through the opposite side, or after N bars.
2. Session zones: at two configurable New York times (default 09:00 and 15:00),
the high and low of that bar become a range. The range only arms once price
has closed outside it.
3. Entry: price must retrace back into a zone between the Min and Max Pullback
levels (measured as a fraction of the zone's height), and the bar must close
as a rejection candle in the trend direction. A cooldown enforces a minimum
bar spacing between signals.
SETTINGS
Pivot Length — lookback each side for pivot confirmation.
Min / Max Pullback % — the retracement band that counts as a valid entry.
Invalidate Zone After N Bars — age limit on a structure zone.
First Touch Only — allow one signal per structure zone.
Zone 1 / Zone 2 Hour and Minute — session times in New York time.
Only Session Signals — suppress structure-based signals.
Min Bars Between Signals — cooldown.
NOTES
Session zones require an intraday chart. Pivots confirm Pivot Length bars after
they form, so a zone appears only after that confirmation; signals are evaluated
on the live bar and are final at bar close.
This is an indicator, not a strategy, and it does not backtest or measure
performance. It is for study and chart annotation only and is not financial
advice.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.