OPEN-SOURCE SCRIPT
BTC_Hull Suite Strategy

Overview
BTC_Hull Suite Strategy is a trend-following system designed to keep drawdowns modest while staying exposed during genuine uptrends. It uses the Hull Moving Average (HMA) for fast, low-lag trend turns, a long-term SMA filter to avoid chop, and a percentage trailing stop to protect gains.
🔧 What the strategy includes
- Hull Moving Average (HMA) with configurable length (default 55)
- SMA filter (default 130) to trade only with higher-timeframe bias
- Trailing stop in percent (default 5%) based on the running peak of close
- Execution model: signals are evaluated on the previous bar and entries are placed at the next bar’s open (TradingView default)
📈 How it works:
✅ Entry (Long):
Detects a bullish Hull turn by comparing the current HMA to its value 3 bars ago:
h[1] > h3[1] and h[2] <= h3[2] → HMA just turned up on the prior bar
The SMA filter must confirm: close[1] > sma[1]
If both are true (and within the date window), a long is opened next bar at the open
❌ Exit:
Hull turn down: h[1] < h3[1] and h[2] >= h3[2], or
Trailing stop: price closes below peak * (1 – trailingPct)
Either condition closes the position at the current bar’s close
Notes:
pyramiding = 1 → allows one add-on (maximum two concurrent long positions)
Position sizing defaults to 20% of equity per entry (adjustable in Properties)
Who is this for?
This strategy is tailored for Bitcoin traders (spot or perpetuals) who want a rules-based, low-lag trend system with built-in drawdown protection.
It works best on Daily or 4H charts, but parameters can be adapted for other timeframes.
⚠️ Disclaimer
This strategy is provided for educational and research purposes only.
It is not financial advice. Markets are risky — always test on your own data, include realistic fees/slippage, and forward-test before using real capital.
BTC_Hull Suite Strategy is a trend-following system designed to keep drawdowns modest while staying exposed during genuine uptrends. It uses the Hull Moving Average (HMA) for fast, low-lag trend turns, a long-term SMA filter to avoid chop, and a percentage trailing stop to protect gains.
🔧 What the strategy includes
- Hull Moving Average (HMA) with configurable length (default 55)
- SMA filter (default 130) to trade only with higher-timeframe bias
- Trailing stop in percent (default 5%) based on the running peak of close
- Execution model: signals are evaluated on the previous bar and entries are placed at the next bar’s open (TradingView default)
📈 How it works:
✅ Entry (Long):
Detects a bullish Hull turn by comparing the current HMA to its value 3 bars ago:
h[1] > h3[1] and h[2] <= h3[2] → HMA just turned up on the prior bar
The SMA filter must confirm: close[1] > sma[1]
If both are true (and within the date window), a long is opened next bar at the open
❌ Exit:
Hull turn down: h[1] < h3[1] and h[2] >= h3[2], or
Trailing stop: price closes below peak * (1 – trailingPct)
Either condition closes the position at the current bar’s close
Notes:
pyramiding = 1 → allows one add-on (maximum two concurrent long positions)
Position sizing defaults to 20% of equity per entry (adjustable in Properties)
Who is this for?
This strategy is tailored for Bitcoin traders (spot or perpetuals) who want a rules-based, low-lag trend system with built-in drawdown protection.
It works best on Daily or 4H charts, but parameters can be adapted for other timeframes.
⚠️ Disclaimer
This strategy is provided for educational and research purposes only.
It is not financial advice. Markets are risky — always test on your own data, include realistic fees/slippage, and forward-test before using real capital.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.