Valid Range - F1 + F2 + F3 + MTF Screener

VALID RANGE: F1 + F2 + F3 + MTF SCREENER
Detects three "Valid Range" pullback formations in both directions, marks the Structure Break (SB) and the Strong Low / Strong High, and scans up to 8 timeframes in a colour-coded table.
━━━━━━━━━━━━━━━━━━
WHAT IT DOES
━━━━━━━━━━━━━━━━━━
The script finds a candle pattern, waits for a pullback, then confirms the setup when price breaks the structure level. When a setup is confirmed it draws:
- A shaded Valid Range box from Candle 1 to the SB
- The SB level as a line with a label (SB1 / SB2 / SB3)
- The Strong Low (uptrend) or Strong High (downtrend), extended until price takes it out
━━━━━━━━━━━━━━━━━━
THE THREE FORMATIONS (uptrend)
━━━━━━━━━━━━━━━━━━
Formation 1
- C1: bullish candle with an upper wick; its high is the SB level
- PB: the next candle is bearish with a lower high than C1
- SB: C1 high is broken. Strong Low = lowest low of the pullback
Formation 2
- C1: bullish candle (wick optional)
- C2: bearish candle that closes above the C1 high; its high is the SB level
- PB: following candles stay below the C2 high
- SB: C2 high is broken after at least one pullback candle
Formation 3
- Same as Formation 2, but C2 is a bearish candle whose high is equal to the C1 high (within a tolerance you set) instead of closing above it
Downtrend setups are the exact mirror of each formation. They run through the same logic on mirrored prices, so the two sides cannot drift apart.
━━━━━━━━━━━━━━━━━━
MTF SCREENER
━━━━━━━━━━━━━━━━━━
A table on the chart reports, for up to 8 timeframes (default: 1, 5, 15, 30, 60, 240, D, W):
- Bias: whichever side confirmed an SB most recently
- Uptrend / Downtrend status: pullback in progress (with the level that must break), or the latest SB with its age ("now", "3 ago")
- Strong Low and Strong High of the latest confirmed SB
- Recent SBs are highlighted; pullbacks in progress are shown in orange
An optional Overall box counts the Bias column of the timeframes you tick and shows BULLISH, BEARISH or NEUTRAL. Each timeframe has its own Show and Overall toggle.
━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━
- Formations: enable or disable F1 / F2 / F3; direction Both / Uptrend / Downtrend
- SB triggered by: Wick, Close, or Both. In Both mode the label is tagged C (candle also closed beyond the level) or W (wick only), and wick-only SBs get a dotted line
- F1: require wick on Candle 1
- Invalidate if the pullback undercuts Candle 1 (uptrend) or overshoots it (downtrend)
- Max pullback candles before a setup is dropped
- F3 equal-high tolerance in ticks
- Minimum pullback duration: automatic 8h on the 4H chart, or a custom number of hours for other timeframes
- Visuals: colours, box, SB line, PB/C2 markers, extension of Strong levels, max active levels per side
- Screener: position, text size, "recent SB" window, timeframes
━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━
- Valid Range SB, Uptrend
- Valid Range SB, Downtrend
- Valid setup started, Uptrend
- Valid setup started, Downtrend
━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━
- Detection and drawing run on closed bars only, so there are no repaints or duplicate drawings on realtime ticks
- The screener reports the state of the last closed bar of each timeframe
- Lower-timeframe screener rows depend on the intraday history available for the symbol on your plan
- If several formations fire on the same bar in the screener, the higher formation number is reported
- This is a pattern-detection and visualisation tool, not a trading signal or financial advice. Test any setup on your own markets before relying on it.
Feedback and suggestions are welcome in the comments.
Detects three "Valid Range" pullback formations in both directions, marks the Structure Break (SB) and the Strong Low / Strong High, and scans up to 8 timeframes in a colour-coded table.
━━━━━━━━━━━━━━━━━━
WHAT IT DOES
━━━━━━━━━━━━━━━━━━
The script finds a candle pattern, waits for a pullback, then confirms the setup when price breaks the structure level. When a setup is confirmed it draws:
- A shaded Valid Range box from Candle 1 to the SB
- The SB level as a line with a label (SB1 / SB2 / SB3)
- The Strong Low (uptrend) or Strong High (downtrend), extended until price takes it out
━━━━━━━━━━━━━━━━━━
THE THREE FORMATIONS (uptrend)
━━━━━━━━━━━━━━━━━━
Formation 1
- C1: bullish candle with an upper wick; its high is the SB level
- PB: the next candle is bearish with a lower high than C1
- SB: C1 high is broken. Strong Low = lowest low of the pullback
Formation 2
- C1: bullish candle (wick optional)
- C2: bearish candle that closes above the C1 high; its high is the SB level
- PB: following candles stay below the C2 high
- SB: C2 high is broken after at least one pullback candle
Formation 3
- Same as Formation 2, but C2 is a bearish candle whose high is equal to the C1 high (within a tolerance you set) instead of closing above it
Downtrend setups are the exact mirror of each formation. They run through the same logic on mirrored prices, so the two sides cannot drift apart.
━━━━━━━━━━━━━━━━━━
MTF SCREENER
━━━━━━━━━━━━━━━━━━
A table on the chart reports, for up to 8 timeframes (default: 1, 5, 15, 30, 60, 240, D, W):
- Bias: whichever side confirmed an SB most recently
- Uptrend / Downtrend status: pullback in progress (with the level that must break), or the latest SB with its age ("now", "3 ago")
- Strong Low and Strong High of the latest confirmed SB
- Recent SBs are highlighted; pullbacks in progress are shown in orange
An optional Overall box counts the Bias column of the timeframes you tick and shows BULLISH, BEARISH or NEUTRAL. Each timeframe has its own Show and Overall toggle.
━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━
- Formations: enable or disable F1 / F2 / F3; direction Both / Uptrend / Downtrend
- SB triggered by: Wick, Close, or Both. In Both mode the label is tagged C (candle also closed beyond the level) or W (wick only), and wick-only SBs get a dotted line
- F1: require wick on Candle 1
- Invalidate if the pullback undercuts Candle 1 (uptrend) or overshoots it (downtrend)
- Max pullback candles before a setup is dropped
- F3 equal-high tolerance in ticks
- Minimum pullback duration: automatic 8h on the 4H chart, or a custom number of hours for other timeframes
- Visuals: colours, box, SB line, PB/C2 markers, extension of Strong levels, max active levels per side
- Screener: position, text size, "recent SB" window, timeframes
━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━
- Valid Range SB, Uptrend
- Valid Range SB, Downtrend
- Valid setup started, Uptrend
- Valid setup started, Downtrend
━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━
- Detection and drawing run on closed bars only, so there are no repaints or duplicate drawings on realtime ticks
- The screener reports the state of the last closed bar of each timeframe
- Lower-timeframe screener rows depend on the intraday history available for the symbol on your plan
- If several formations fire on the same bar in the screener, the higher formation number is reported
- This is a pattern-detection and visualisation tool, not a trading signal or financial advice. Test any setup on your own markets before relying on it.
Feedback and suggestions are welcome in the comments.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。