OPEN-SOURCE SCRIPT
更新済 Model Follower

This indicator maps price structure using confirmed candle closes rather than wicks — a new high or low only registers once price actually closes beyond the prior range, filtering out spikes that don't follow through. Each new range is anchored to the true swing point: the last opposing candle (or any wick that pierced past it) before the break, giving a clean staircase view of how structure is actually developing.
From that structure, it plots two live target references:
Local Target (orange) — tracks the current extreme of whichever direction price is presently trending, on your chart's own timeframe. Pushing higher, it follows the developing high; the moment structure turns lower, it immediately switches to the developing low. This updates in real time and reflects what's happening on your timeframe right now — including during a countertrend pullback inside a larger trend.
HTF Target (blue) — the same structure logic, calculated independently on a higher timeframe pulled automatically based on your current chart's timeframe. This gives a read on where price is headed on a broader scale without needing to manually flip charts.
How to use it: when the local and HTF targets are pointing the same direction, the immediate move has higher-timeframe backing. When they diverge — say, local structure just turned bullish but the HTF target is still pointing down — that's often a sign you're looking at a countertrend bounce or a pullback rather than a fresh trend continuation, not a fully confirmed reversal yet.
Note: this tool intentionally doesn't auto-label market phases (accumulation/distribution) or draw supply/demand zones — reading trend context and zone validity is left to the trader, since that involves judgment a mechanical rule can't fully capture. This indicator is built to support that reading, not replace it.
From that structure, it plots two live target references:
Local Target (orange) — tracks the current extreme of whichever direction price is presently trending, on your chart's own timeframe. Pushing higher, it follows the developing high; the moment structure turns lower, it immediately switches to the developing low. This updates in real time and reflects what's happening on your timeframe right now — including during a countertrend pullback inside a larger trend.
HTF Target (blue) — the same structure logic, calculated independently on a higher timeframe pulled automatically based on your current chart's timeframe. This gives a read on where price is headed on a broader scale without needing to manually flip charts.
How to use it: when the local and HTF targets are pointing the same direction, the immediate move has higher-timeframe backing. When they diverge — say, local structure just turned bullish but the HTF target is still pointing down — that's often a sign you're looking at a countertrend bounce or a pullback rather than a fresh trend continuation, not a fully confirmed reversal yet.
Note: this tool intentionally doesn't auto-label market phases (accumulation/distribution) or draw supply/demand zones — reading trend context and zone validity is left to the trader, since that involves judgment a mechanical rule can't fully capture. This indicator is built to support that reading, not replace it.
リリースノート
Here's a clean rundown of everything that changed in Model Follower, from the original baseline to where it landed:**1. Origin definition — from "any opposite candle" to "clean break of the previous candle"**
The original version tracked the origin as simply the last down-close candle (or any candle whose wick pierced past it), regardless of whether that candle actually broke away from what came before it. That meant candles sitting *inside* the range of the prior candle could still count — noisy, not a real reference point.
The new rule: a candle only becomes a fresh valid low if it **closes below the immediately preceding candle's low** (mirrored: closes above the preceding candle's high for a valid high) — regardless of what color that preceding candle was. Because this compares to just one bar back each time, it naturally chains itself down through a pullback: a down candle still contained inside a prior up candle's range doesn't count as anything; the next down candle that actually clears *that* candle does.
**2. Wick extension on top of the clean-break rule**
Once a valid low is established via a clean break, later candles don't need to independently qualify as another clean break to update it — if *any* subsequent candle's wick simply dips lower than the currently tracked low, that low extends to match it. This guarantees the origin always reflects the true deepest wick reached during the whole pullback, not just wherever the last clean-break candle happened to close.
**Net effect:** the origin candle selection is now precise on two fronts — it only starts tracking from a genuine structural break (not noise), and it stays accurate to the actual price extreme reached, not just the extreme of one specific candle. Everything else in the script — the close-based structure engine, the Local/HTF dual target, the auto-matched higher timeframe — is unchanged from before.
リリースノート
Demand / Supply ZonesColored boxes marking the exact candle that price pulled back into right before a structural break — teal for demand (before an up-break), red for supply (before a down-break). Only one zone is ever "live" at a time: whichever formed most recently keeps extending forward until either a new zone replaces it or price closes back through it (at which point it grays out as mitigated).
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。