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. קרא עוד ב־תנאי השימוש.