OPEN-SOURCE SCRIPT
HAP + Sniper Combined

trend regime filtering with normalized price positioning.
The first component, the EMA Cage, is built using three exponential moving averages (14, 50, and 100 periods). It defines dynamic trend zones based on the relative alignment of short, medium, and long-term EMAs. When the EMAs are aligned upward or downward, the structure highlights directional trend phases through adaptive coloring and band visualization.
The second component, the Sniper Band, transforms price behavior into normalized oscillatory values using both range-based and mean-reversion calculations. It compares short-term price distribution against a smoothed percentage deviation from a moving average. These two normalized signals are then mapped back onto the price scale to create a structured dual-band system.
The interaction between these two lines defines market state:
When both normalized components converge closely, it indicates equilibrium or compression zones.
When separation increases, it reflects directional expansion and trend development.
Color transitions represent relative dominance between the two normalized measures.
This combined structure is designed to visualize both trend direction (EMA Cage) and internal price pressure (Sniper Band) within the same framework, enabling clearer identification of market phases such as consolidation, expansion, and directional bias shifts.
The first component, the EMA Cage, is built using three exponential moving averages (14, 50, and 100 periods). It defines dynamic trend zones based on the relative alignment of short, medium, and long-term EMAs. When the EMAs are aligned upward or downward, the structure highlights directional trend phases through adaptive coloring and band visualization.
The second component, the Sniper Band, transforms price behavior into normalized oscillatory values using both range-based and mean-reversion calculations. It compares short-term price distribution against a smoothed percentage deviation from a moving average. These two normalized signals are then mapped back onto the price scale to create a structured dual-band system.
The interaction between these two lines defines market state:
When both normalized components converge closely, it indicates equilibrium or compression zones.
When separation increases, it reflects directional expansion and trend development.
Color transitions represent relative dominance between the two normalized measures.
This combined structure is designed to visualize both trend direction (EMA Cage) and internal price pressure (Sniper Band) within the same framework, enabling clearer identification of market phases such as consolidation, expansion, and directional bias shifts.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。