OPEN-SOURCE SCRIPT
Convex Hull Channel [forexobroker]

🔶 OVERVIEW
Convex Hull Channel forms a tight envelope from the rolling maximum of body-tops (max of open and close) and minimum of body-bottoms (min of open and close), filtering wick spikes that classic Donchian channels reward. An expansion regime, defined as channel width above its 50-bar average, gates breakout signals to high-volatility periods only.
🔶 ALGORITHM
1. body_high = max(open, close); body_low = min(open, close).
2. upper = ta.highest(body_high, N); lower = ta.lowest(body_low, N).
3. width = upper - lower; expansion regime when width >= width_avg * (1 + k).
4. Buy break: close crosses prior bar's upper envelope inside expansion regime.
5. Sell break: close crosses prior bar's lower envelope inside expansion regime.
🔶 SIGNAL LOGIC
- Buy: expansion AND close crosses upper[1] AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: expansion AND close crosses lower[1] AND mirror conditions.
- Position-lock state machine.
🔶 INPUTS
- Envelope Window (default 20)
- Min Width Excess (default 0.20)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, envelope bands, buy / sell colors
🔶 ALERTS
CHC Buy, CHC Sell, CHC Any Signal, CHC Expansion On, CHC Expansion Off, CHC Upper Cross, CHC Lower Cross, CHC Outside, CHC Webhook JSON.
🔶 LIMITATIONS
- Body-only envelope gives fewer false breaks than wick-inclusive Donchian, but can miss legitimate moves that close back inside the body range.
- Expansion regime is rolling-average relative; a long quiet period followed by even modest expansion will fire whereas absolute-width logic might not.
- Cross-of-prior-bar (upper[1]) introduces a 1-bar delay vs immediate-bar break; intentional, reduces noise.
- Defaults tuned for 15m-1H on majors and indices; very fast scalping timeframes may want a smaller window.
Convex Hull Channel forms a tight envelope from the rolling maximum of body-tops (max of open and close) and minimum of body-bottoms (min of open and close), filtering wick spikes that classic Donchian channels reward. An expansion regime, defined as channel width above its 50-bar average, gates breakout signals to high-volatility periods only.
🔶 ALGORITHM
1. body_high = max(open, close); body_low = min(open, close).
2. upper = ta.highest(body_high, N); lower = ta.lowest(body_low, N).
3. width = upper - lower; expansion regime when width >= width_avg * (1 + k).
4. Buy break: close crosses prior bar's upper envelope inside expansion regime.
5. Sell break: close crosses prior bar's lower envelope inside expansion regime.
🔶 SIGNAL LOGIC
- Buy: expansion AND close crosses upper[1] AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: expansion AND close crosses lower[1] AND mirror conditions.
- Position-lock state machine.
🔶 INPUTS
- Envelope Window (default 20)
- Min Width Excess (default 0.20)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, envelope bands, buy / sell colors
🔶 ALERTS
CHC Buy, CHC Sell, CHC Any Signal, CHC Expansion On, CHC Expansion Off, CHC Upper Cross, CHC Lower Cross, CHC Outside, CHC Webhook JSON.
🔶 LIMITATIONS
- Body-only envelope gives fewer false breaks than wick-inclusive Donchian, but can miss legitimate moves that close back inside the body range.
- Expansion regime is rolling-average relative; a long quiet period followed by even modest expansion will fire whereas absolute-width logic might not.
- Cross-of-prior-bar (upper[1]) introduces a 1-bar delay vs immediate-bar break; intentional, reduces noise.
- Defaults tuned for 15m-1H on majors and indices; very fast scalping timeframes may want a smaller window.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🔵Gain access to our powerful tools : forexobroker.com/tv
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🔵Gain access to our powerful tools : forexobroker.com/tv
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。