OPEN-SOURCE SCRIPT
Обновлено 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.
Информация о релизе
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.
⸻
Информация о релизе
Version 4.2 Update:• Improved bar spacing logic and volume filter for more reliable signals.
• Enhanced session time configuration and HMA colour customisation.
Информация о релизе
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.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.