OPEN-SOURCE SCRIPT
HL/2 Fast & Slow - Cloud Signals + Backtest + Exit Alarms

Description:
This indicator plots two HL/2 moving averages—a fast and a slow line—on the chart, along with dynamic upper and lower bands based on the slow line and ATR. It features a colored cloud between the two averages to visualize trend direction, and it provides buy/sell signals based on the alignment of the two lines.
Key Features:
Fast & Slow HL/2 Averages
Fast and slow HL/2 lines calculated as simple moving averages.
Lines change color based on direction (up/down), configurable via style settings.
Dynamic Upper and Lower Bands
Bands calculated from the slow line using ATR to capture volatility.
Trend Cloud
Fills the area between fast and slow lines.
Green if both lines are rising, red if both are falling, gray if lines disagree.
Transparency adjustable for better visual clarity.
Buy/Sell Signals
Signals appear only when both lines align in the same direction.
Two modes available:
Series Signals: generates a signal whenever the cloud color changes.
Single Signal: generates a signal only when the slow line changes direction.
Signals are plotted as small triangles above/below bars.
Alerts can be set for both buy/sell signals.
Exit Modes and Alerts
Exit positions either on a reverse signal or when the cloud enters a neutral gray zone.
Exit alerts are available for both conditions.
Integrated Backtest Panel
Shows total trades, win rate, and cumulative profit in USD.
Considers position size and commission (configurable).
Panel color indicates profit (green) or loss (red).
Fixed position on chart for easy reference.
Inputs:
Fast and slow periods, ATR length, ATR multiplier.
Position size, commission percentage.
Signal mode (Series or Single).
Exit mode (Reverse Signal or Gray Area).
Style options for line colors and cloud colors.
Time window for backtesting (daily, weekly, monthly, or custom date range).
Usage:
Ideal for identifying trend direction and potential entry points.
Can be used for manual trading or as part of an automated strategy with alerts.
Provides a visual and statistical overview of trading performance via the backtest panel.
This indicator plots two HL/2 moving averages—a fast and a slow line—on the chart, along with dynamic upper and lower bands based on the slow line and ATR. It features a colored cloud between the two averages to visualize trend direction, and it provides buy/sell signals based on the alignment of the two lines.
Key Features:
Fast & Slow HL/2 Averages
Fast and slow HL/2 lines calculated as simple moving averages.
Lines change color based on direction (up/down), configurable via style settings.
Dynamic Upper and Lower Bands
Bands calculated from the slow line using ATR to capture volatility.
Trend Cloud
Fills the area between fast and slow lines.
Green if both lines are rising, red if both are falling, gray if lines disagree.
Transparency adjustable for better visual clarity.
Buy/Sell Signals
Signals appear only when both lines align in the same direction.
Two modes available:
Series Signals: generates a signal whenever the cloud color changes.
Single Signal: generates a signal only when the slow line changes direction.
Signals are plotted as small triangles above/below bars.
Alerts can be set for both buy/sell signals.
Exit Modes and Alerts
Exit positions either on a reverse signal or when the cloud enters a neutral gray zone.
Exit alerts are available for both conditions.
Integrated Backtest Panel
Shows total trades, win rate, and cumulative profit in USD.
Considers position size and commission (configurable).
Panel color indicates profit (green) or loss (red).
Fixed position on chart for easy reference.
Inputs:
Fast and slow periods, ATR length, ATR multiplier.
Position size, commission percentage.
Signal mode (Series or Single).
Exit mode (Reverse Signal or Gray Area).
Style options for line colors and cloud colors.
Time window for backtesting (daily, weekly, monthly, or custom date range).
Usage:
Ideal for identifying trend direction and potential entry points.
Can be used for manual trading or as part of an automated strategy with alerts.
Provides a visual and statistical overview of trading performance via the backtest panel.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.