Home > Blog > Forex Indicators Trading > Trend Duration Forecast Indicator by ChartPrime

Trend Duration Forecast Indicator by ChartPrime

Published by Rafay Javed
Updated on

Trend Duration Forecast indicator by ChartPrime is one of the most useful indicators for traders, because not only it identifies the trend of the market whether it is bullish or bearish, but it also helps traders find out how long the current trend will last. Instead of just relying on the visual interpretation the Trend Duration Forecast Indicator used data of the previous candles to calculate and estimate how long the current trend will last. This makes indicator exceptionally powerful and useful for the specific traders such as swing traders, position traders and the traders who want to know when to enter the trader and also when to start preparing to exit that trade and Trend Duration Forecast Indicator solves this problem for them.

Trend Duration Forecast
Trend Duration Forecast

The Foundation: Hull Moving Average (HMA)

Every trend in the Trend Duration Forecast indicator starts and ends with the Hull Moving Average or abbreviated as HMA. It was developed by the Australian trader Alan Hull in 2005. Hull Moving Average is one of the most responsive and smoothest moving averages ever created. Unlike Simple Moving Average that treats all the prices equally and Exponential Moving Average that gives preference to the recent prices a tad bit more, Hull Moving Average does not have that much lag and also keeps the line smoother. This is why it is used to identify the new bullish or bearish phases as they begin. 

Although Hull Moving Average is easily accessed on most charting and trading platforms, understanding the mechanism behind it may be helpful to use it more appropriately. To calculate the HMA on their own, traders can follow these steps:

  1. Choose a number of periods: Suggested by Alan Hull is 16, but traders can use any number.
  2. Calculate two weighted moving averages (WMAs):
    • One for the entire length of time (number of periods)
    • Another for half its length (number of periods/2)
  3. Multiply the shorter-period WMA by two and subtract the first WMA: This result gives you the raw, non-smoothed HMA.
  4. Find the square root of the number of periods: You can round it up or down to the nearest whole number.
  5. Calculate a third WMA using the resulting number: This is your final Hull moving average. 

Its core formula is:

HMA = WMA(2 × WMA(price, length/2) – WMA(price, length), √length)

Where:

  • price = chosen source price (commonly close)
  • length = user-defined lookback period
  • WMA = Weighted Moving Average

The result is a line that moves almost instantly with the price changes, filtering out all the false signals that frequently happen on other moving averages.

You can think of the Hull Moving Average as a referee in the Trend Duration Forecast which decides when the new uptrend or downtrend has officially begun and when the previous one has ended.

Hull Moving Average
Hull Moving Average

How Trends Are Detected and Measured

The moment when the price closes on either side of the Hull Moving Average the indicator declares a new trend. When the Hull Moving Average starts moving upward and the indicator registers it as the start of an uptrend and the Hull Moving Average line turns green. Similarly if the Hull Moving Average starts moving downward the indicator confirms it as a downtrend and the Hull Moving Average line turns red. From the exact moment a trend change occurs an internal counter starts that counts every new bar as part of the ongoing trend. 

As soon as a trend ends it is stamped with complete duration that trends lasted (e.g Trend 44) and is stored in its memory and is also shown on the chart. Over time the indicator manages two separate lists one for the bullish trends and one for the bearish trends. 

Statistical Forecasting – Turning History into Expectation

This is where the indicator becomes truly unique. With enough historical data collected the indicator then performs a Forecast Projection, a statistical estimation of how long the current trend may last. The indicator does this by calculating the rolling average of the last N completed trends (N is user adjustable but typically it is set at 10-30). This average becomes the probable length for the current trend which is then expressed on the chart. 

The average is computed using:

Average_Trend_Length = (sum of last N trend lengths) / N

where:

N = sample size (how many past trends are included)

trend lengths = number of bars in each completed trend

Imagine the average of the last 15 candles on a price chart is 38. The moment a new uptrend begins, the indicator draws a projection line forward from that starting bar and places a marker at bar number 38. As each new candle forms, you see two numbers updating live:

  • Real Length: how many bars the trend has already lasted (e.g., 21).
  • Probable Length: the statistical forecast (still 38 until enough new data changes the average).

When Real Length surpasses Probable Length, this means that the trend is entering a zone of exhaustion. From this point onwards, the longer it stretches beyond the last average lengths of the trend, the higher the probability that buyers or seller) are becoming exhausted and a reversal may happen sometime soon.

Remaining_Bars = Average_Trend_Length – Current_Trend_Bars

Where:

Current_Trend_Bars = real-time count of bars within the ongoing trend

To help traders visualize these insights, the indicator includes a Historical Data Table that lists the durations of previous uptrends and downtrends helping traders visualize whether the current market is going through a long and stable trend or the market is short and choppy

Another important element of this indicator is the adaptive sampling which allows the trader to determine how many historical trends should be included in the calculations. A small sample size creates a sensitive forecast that reacts quickly to the changing condition while a large sample size creates a smooth forecast by including more data in the calculation. 

Statistical Forecasting
Statistical Forecasting

Strengths and Limitations

One of the strengths of the trend duration forecast is that it adapts to the ever changing condition of the market and timeframe instead of one size fits all assumptions. It learns from the current and history of the market and then updates its calculation based on the updating data. Its main limitation appears during extreme parabolic moves or structural regime changes. In those cases, trends routinely blow past multiple standard deviations of historical length.

Trend Duration Forecast – Settings Explained

SettingDefault ValueWhat It ControlsHow to Use It Simply
Smoothing Length50Length of the Hull Moving Average (HMA)Higher (50–100) = smoother, for daily/weekly charts Lower (20–40) = faster, for 1H/4H or volatile assets
Trend Detection Sensitivity3How strict the trend-change confirmation is1–2 = very fast (scalping, crypto) 3 = balanced (default, most swing trading) 4–6 = conservative (ranging markets, reduce false signals)
Trend Sample Size10Number of past trends used for average8–12 = reactive, adapts fast to regime changes 15–30 = more stable, smoother forecasts (long-term charts)
↑ Trend colorGreenColor of bullish HMA and labelsChange for visibility / personal preference
↓ Trend colorOrangeColor of bearish HMA and labelsChange for visibility / personal preference
Trend Duration Forecast Settings
Trend Duration Forecast Settings
Show your love!

Do you want to get success in Trading?

Here's the Roadmap:

1. Learn supply and demand from the cheat sheet here
2. Get access the Supply & Demand Indicator here
3. Understand the fair value gap here
4. Use the set and forget strategy here
5. Follow the risk management plan here

Leave a Comment