OPEN-SOURCE SCRIPT
Hull UT Bot Strategy - UT Main + Hull Confirm

This strategy merges the strengths of the Hull Moving Average (HMA) Suite and the UT Bot Alerts indicator to create a trend-following system with reduced signal noise. The UT Bot acts as the primary signal generator, using an ATR-based trailing stop to identify momentum shifts and potential entry points. These signals are then filtered by the Hull Suite for trend confirmation: long entries require a UT Bot buy signal aligned with a bullish (green) Hull band, while short entries need a UT Bot sell signal with a bearish (red) Hull band. This combination aims to capture high-probability swings while avoiding whipsaws in choppy markets.The Hull Suite provides a responsive, smoothed moving average (configurable as HMA, EHMA, or THMA) that colors its band based on trend direction, offering a visual and logical filter for the faster UT Bot signals. The result is a versatile strategy suitable for swing trading on timeframes like 1H or 4H, with options for higher timeframe Hull overlays for scalping context. It includes backtesting capabilities via Pine Script's strategy functions, plotting confirmed signals, raw UT alerts (for reference), and the trailing stop line.Key benefits:Noise Reduction: Hull confirmation eliminates ~50-70% of false UT Bot signals in ranging markets (based on typical backtests).
Trend Alignment: Ensures entries follow the broader momentum defined by the Hull band.
Customization: Adjustable sensitivity for different assets (e.g., forex, stocks, crypto).
How It WorksUT Bot Core: Calculates an ATR trailing stop (sensitivity via "Key Value"). A buy signal triggers when price crosses above the stop (bullish momentum), and sell when below (bearish).
Hull Filter: The Hull band is green if current Hull > Hull[2] (bullish), red otherwise. Signals only fire on alignment.
Entries: Long on confirmed UT buy + green Hull; Short on confirmed UT sell + red Hull. No explicit exits—relies on opposite signals for reversal.
Visuals: Plots Hull band, UT trailing stop, confirmed labels (Long/Short), and optional raw UT circles. Bar colors reflect UT position, tinted by confirmation.
Alerts: Triggers on confirmed long/short for automated notifications.
This setup performs well in trending markets but may lag in strong reversals—pair with risk management (e.g., 1-2% per trade).Recommended Settings Use these as starting points; optimize via back testing on your asset/timeframe.
-Hull Variation
Hma
Standard Hull for responsiveness; switch to EHMA for smoother crypto, THMA for volatile stocks.
-Hull Length
55
Balances swing detection; use 180-200 for dynamic S/R levels on higher TFs.
-Hull Length Multiplier
1.0
Keep at 1 for native TF; >1 for HTF straight bands (e.g., 2 for 2x smoothing).
-Show Hull from HTF
False
Enable for scalping (e.g., 1m chart with 15m Hull); set HTF to "15" or "240".
-Color Hull by Trend
True
Visual trend cue; disable for neutral orange line.
-Color Candles by Hull
False
Enable for trend visualization; conflicts with UT bar colors if True.
-Show Hull as Band
True
Fills area for clear up/down zones; set transparency to 40-60.
-Hull Line Thickness
1-2
Thinner for clean charts; 2+ for emphasis.
-UT Bot Key Value
1
Default sensitivity (ATR multiple); 0.5 for aggressive signals, 2 for conservative.
-UT Bot ATR Period
10
Standard volatility window; 14 for longer swings, 5 for intraday.
-UT Signals from HA
False
Use True for smoother signals in noisy markets (Heikin Ashi close).
Backtesting Tips: Test on liquid pairs like EURUSD (1H) or BTCUSD (4H) with 1% equity risk. Expect win rates ~45-60% in trends, with 1.5-2:1 reward:risk. Adjust Key Value down for more trades, Hull Length up for fewer.
Trend Alignment: Ensures entries follow the broader momentum defined by the Hull band.
Customization: Adjustable sensitivity for different assets (e.g., forex, stocks, crypto).
How It WorksUT Bot Core: Calculates an ATR trailing stop (sensitivity via "Key Value"). A buy signal triggers when price crosses above the stop (bullish momentum), and sell when below (bearish).
Hull Filter: The Hull band is green if current Hull > Hull[2] (bullish), red otherwise. Signals only fire on alignment.
Entries: Long on confirmed UT buy + green Hull; Short on confirmed UT sell + red Hull. No explicit exits—relies on opposite signals for reversal.
Visuals: Plots Hull band, UT trailing stop, confirmed labels (Long/Short), and optional raw UT circles. Bar colors reflect UT position, tinted by confirmation.
Alerts: Triggers on confirmed long/short for automated notifications.
This setup performs well in trending markets but may lag in strong reversals—pair with risk management (e.g., 1-2% per trade).Recommended Settings Use these as starting points; optimize via back testing on your asset/timeframe.
-Hull Variation
Hma
Standard Hull for responsiveness; switch to EHMA for smoother crypto, THMA for volatile stocks.
-Hull Length
55
Balances swing detection; use 180-200 for dynamic S/R levels on higher TFs.
-Hull Length Multiplier
1.0
Keep at 1 for native TF; >1 for HTF straight bands (e.g., 2 for 2x smoothing).
-Show Hull from HTF
False
Enable for scalping (e.g., 1m chart with 15m Hull); set HTF to "15" or "240".
-Color Hull by Trend
True
Visual trend cue; disable for neutral orange line.
-Color Candles by Hull
False
Enable for trend visualization; conflicts with UT bar colors if True.
-Show Hull as Band
True
Fills area for clear up/down zones; set transparency to 40-60.
-Hull Line Thickness
1-2
Thinner for clean charts; 2+ for emphasis.
-UT Bot Key Value
1
Default sensitivity (ATR multiple); 0.5 for aggressive signals, 2 for conservative.
-UT Bot ATR Period
10
Standard volatility window; 14 for longer swings, 5 for intraday.
-UT Signals from HA
False
Use True for smoother signals in noisy markets (Heikin Ashi close).
Backtesting Tips: Test on liquid pairs like EURUSD (1H) or BTCUSD (4H) with 1% equity risk. Expect win rates ~45-60% in trends, with 1.5-2:1 reward:risk. Adjust Key Value down for more trades, Hull Length up for fewer.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.