Trend Duration Forecast [ChartPrime]

Published on MillionChart by LimitTrader.

Trend Duration Forecast estimates how long a bullish or bearish trend may last. It uses a Hull Moving Average (HMA) to detect direction changes, records how long each past trend ran, and uses the average to project how long the current trend might continue.

Features:
- Trend detection: the HMA identifies when price moves into a new uptrend or downtrend.
- Duration counting: counts the bars in each completed bullish and bearish phase.
- Forecast projection: draws an estimated continuation line from the average length of recent trends.
- Real-time updates: the "Real Length" label updates as the trend develops.
- Historical table: lists previous bullish and bearish durations and their averages.
- Adaptive sampling: a sample-size setting smooths the forecast.
- Colours: uptrends in green and downtrends in orange.

How to use:
- Trend Detection Sensitivity controls how fast the indicator reacts. Lower values respond faster; higher values smooth out noise.
- Compare the Real Length of the current trend with the Probable Length forecast to judge whether the move may be nearing exhaustion.
- Study the historical table to learn the typical lifespan of trends in the current market.
- The colour-coded HMA line and projection arrows show when momentum is fading.
- It suits swing and trend-following approaches where trend length matters.