OPEN-SOURCE SCRIPT
Mis à jour US30 HMA Signal v2.8

Indicator Description – US30 HMA Signal v2.8
Overview:
The US30 HMA Signal indicator is designed to generate Buy and Sell signals based on the crossover of three Hull Moving Averages (HMAs). The indicator focuses on identifying momentum shifts and directional bias using the 9, 21, and 50 HMA structures, optimised for the US30 (Dow Jones) index.
⸻
Indicator Components:
1. Hull Moving Averages (HMAs):
• 9 HMA (Green): Fastest HMA, responds quickly to price changes.
• 21 HMA (Amber): Medium-term HMA, acts as a transitional filter.
• 50 HMA (Red): Slowest HMA, defines the broader trend direction.
⸻
Logic and Signal Conditions:
1. Session Filter:
• Signals are only generated during the US session, defined as starting at 13:30 BST.
2. Directional Bias:
• Bullish Bias: Occurs when both the 9 HMA and 21 HMA are above the 50 HMA.
• Bearish Bias: Occurs when both the 9 HMA and 21 HMA are below the 50 HMA.
3. Crossover Logic:
• Buy Signal: Prints when the 9 HMA crosses above the 21 HMA while the directional bias is bullish.
• Sell Signal: Prints when the 9 HMA crosses below the 21 HMA while the directional bias is bearish.
4. Minimum Bar Spacing:
• To avoid signal clustering, a minimum bar spacing of 5 bars is implemented between consecutive signals.
⸻
Plotting:
• Buy Signal: Displays as a green label below the candle with the text “BUY.”
• Sell Signal: Displays as a red label above the candle with the text “SELL.”
⸻
Purpose and Usage:
• The indicator is designed for traders looking to capture momentum shifts in the US30 index using HMA crossovers.
• It is best applied on the 5-minute timeframe to balance signal frequency and reliability.
• The strict session filter ensures signals are only generated during the most volatile period, aligning with US market activity.
Overview:
The US30 HMA Signal indicator is designed to generate Buy and Sell signals based on the crossover of three Hull Moving Averages (HMAs). The indicator focuses on identifying momentum shifts and directional bias using the 9, 21, and 50 HMA structures, optimised for the US30 (Dow Jones) index.
⸻
Indicator Components:
1. Hull Moving Averages (HMAs):
• 9 HMA (Green): Fastest HMA, responds quickly to price changes.
• 21 HMA (Amber): Medium-term HMA, acts as a transitional filter.
• 50 HMA (Red): Slowest HMA, defines the broader trend direction.
⸻
Logic and Signal Conditions:
1. Session Filter:
• Signals are only generated during the US session, defined as starting at 13:30 BST.
2. Directional Bias:
• Bullish Bias: Occurs when both the 9 HMA and 21 HMA are above the 50 HMA.
• Bearish Bias: Occurs when both the 9 HMA and 21 HMA are below the 50 HMA.
3. Crossover Logic:
• Buy Signal: Prints when the 9 HMA crosses above the 21 HMA while the directional bias is bullish.
• Sell Signal: Prints when the 9 HMA crosses below the 21 HMA while the directional bias is bearish.
4. Minimum Bar Spacing:
• To avoid signal clustering, a minimum bar spacing of 5 bars is implemented between consecutive signals.
⸻
Plotting:
• Buy Signal: Displays as a green label below the candle with the text “BUY.”
• Sell Signal: Displays as a red label above the candle with the text “SELL.”
⸻
Purpose and Usage:
• The indicator is designed for traders looking to capture momentum shifts in the US30 index using HMA crossovers.
• It is best applied on the 5-minute timeframe to balance signal frequency and reliability.
• The strict session filter ensures signals are only generated during the most volatile period, aligning with US market activity.
Notes de version
Updates in Version 3.0 Compared to Version 2.8:1. Session Time Configuration:
• Previous: Fixed session start and end times.
• New: User-defined session start and end times, allowing full customisation of the trading session window.
• Inputs:
• Session Start Hour (24h format)
• Session Start Minute
• Session End Hour (24h format)
• Session End Minute
⸻
2. Customisable HMA Lengths:
• Previous: Fixed HMA lengths (9, 21, 50).
• New: Users can now adjust the lengths of all three HMAs to better align with their trading strategy.
• Inputs:
• HMA Length 1
• HMA Length 2
• HMA Length 3
⸻
3. Customisable HMA Colours:
• Previous: HMAs were not displayed and had fixed colours.
• New: HMAs are now plotted on the chart, and users can select custom colours for each HMA.
• Inputs:
• HMA 1 Colour
• HMA 2 Colour
• HMA 3 Colour
⸻
4. Alerts for Buy/Sell Signals:
• Previous: Signals were printed on the chart but not linked to TradingView alerts.
• New: Alerts are now implemented, allowing users to receive notifications when Buy or Sell signals are triggered.
• Alerts:
• HMA Buy Signal
• HMA Sell Signal
⸻
5. Code Simplification and Organisation:
• The logic structure has been refined for better readability and maintainability.
• Unnecessary inputs, such as the "Session End Time" field, have been removed for clarity.
⸻
Notes de version
Version 4.2 Update:• Improved bar spacing logic and volume filter for more reliable signals.
• Enhanced session time configuration and HMA colour customisation.
Notes de version
Update v4.5: Enhanced Performance and FlexibilityThis update focuses on improving the robustness, performance, and user customizability of the US30 HMA Signal indicator.
Key Improvements:
Timezone-Aware Sessions: The session filter now uses specific New York (EST) market hours (0930-1600 America/New_York), ensuring consistent behavior regardless of a user's local chart time settings.
Improved Efficiency: HMA calculations were optimized by switching to the built-in ta.hma() function.
Filter Customization: Added toggles in the indicator settings to easily enable or disable the Volume Filter and the Dynamic Spacing Filter. This allows users to fine-tune signal frequency.
Enhanced Visuals: The active trading session is now highlighted with a subtle blue background shade, and signal labels now display the exact entry price.
Bug Fixes: Corrected several logical errors in the signal generation logic that prevented signals from appearing in the previous v4.4 attempt.
Notes de version
HMA Precision Pro – US30 Edition | Full RebuildSignal Logic
Trigger switched from HMA1/HMA3 crossover to HMA1/HMA2 crossover for earlier, cleaner entries. Added HMA2 slope filter to confirm momentum is building, not fading. Trend gate now uses HMA3 direction as the primary bias.
New Filters
RSI momentum confirmation. HTF confluence (soft gate — tightens RSI requirement when HTF disagrees rather than blocking entirely). Volume threshold scaled per timeframe. Minimum bar spacing to prevent over-trading.
Quick Tune
Three plain-English controls added at the top of settings: Signal Frequency (Conservative / Balanced / Aggressive), Trade Direction (Both / Buys Only / Sells Only), Session Filter (US Session / All Hours).
TP & SL
Split into TP1 and TP2 targets. All trade data (Entry, TP1, TP2, Stop Loss, R:R) moved off the chart and onto the dashboard.
Dashboard
Full redesign. Now shows live filter status, last signal data, win rate split by buys and sells, ATR, R:R ratio and current signal mode. TP/SL lines removed from chart.
Signal Markers
User-selectable: Circle (default), Triangle or Label.
Presets
Six timeframe presets (1m through 1H) each auto-configure HMA lengths, spacing, volume threshold, HTF timeframe and TP/SL multipliers.
Tooltips
Added to every setting explaining what it does and how to adjust for more or fewer signals.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Professional TradingView indicators for SMC, scalping, and structural trading. Built for serious traders.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Professional TradingView indicators for SMC, scalping, and structural trading. Built for serious traders.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.