Dual Horizon Momentum Delta
- Göstergeler
- Sürüm: 1.0
- Etkinleştirmeler: 5
# Dual Horizon Momentum Delta - Short versus long, time corrected
*Category: Momentum | Difficulty: advanced | Window: separate window below the chart | Markets: Universal (Forex, indices, commodities, crypto, stocks) | Suggested timeframes: M15, M30, H1, H4, D1*
## Short description
> Compares momentum on two horizons after normalising them by the square root of time, a correction without which the long horizon would always look larger by pure construction.
### Overview
Directly comparing six bar momentum with forty bar momentum is a frequent and rarely acknowledged statistical error. On a random walk the expected size of a move grows as the square root of elapsed time: forty bar momentum is on average two and a half times the six bar one, simply because more time passed, not because the market is saying anything. Dual Horizon Momentum Delta applies the due correction, dividing each horizon by the ATR multiplied by the square root of its own bar count. After that operation both values have the same expected amplitude in the absence of structure, and their difference finally becomes informative: positive when the short runs beyond what the long justifies, negative when it lags behind.
### How the calculation works
1. For both the short and the long horizon the price change over the respective number of bars is computed.
2. Each change is divided by the ATR multiplied by the square root of the horizon bar count.
3. This correction follows from the fact that, on a random walk, the standard deviation of the sum of n changes grows as the square root of n.
4. The two normalised quantities are drawn as lines, so they can also be read separately.
5. The histogram reports their difference, which is the genuinely new information compared with a classic double momentum.
6. The histogram is coloured only beyond the InpDeltaLevel threshold, to separate real divergences from noise.
### How to use it
- Positive difference with both lines above zero: acceleration inside an uptrend, a context favouring continuation.
- Negative difference with the long line still positive: the short horizon is retracing inside an intact trend, the classic entry window.
- The sign change of the difference often precedes the sign change of the long line by several bars.
- Absolute line values above one and a half indicate moves already well beyond what volatility alone would justify.
- Set the two horizons in a one to six or one to eight ratio: horizons too close together make the difference meaningless.
### Who it is for and on which timeframes
It targets quantitatively minded traders and developers who want a methodologically correct comparison between horizons rather than a raw difference. It works from M15 to D1. Mastering stochastic process theory is not required, but understanding why the square root of time correction is necessary is what separates informed use from mechanical use. Anyone ignoring it will end up reading a time scale artefact as a signal.
### Practical example of reading a signal
On USDCHF H1 the long line sits steadily at +1.1: the underlying trend is bullish and stronger than volatility would justify. The short line falls to -0.4 and the histogram turns red at -1.5: the very short horizon is retracing decisively while the base holds. This is the preferred entry configuration for continuation traders, because the pullback is measurable and the tendency still intact. Three bars later the short line climbs back above zero, the histogram returns to neutral and price resumes rising. Had the long line also dropped below zero, there would have been no pullback to buy, but a regime change.
## Input parameters
| Parameter | Default | Description |
|---|---|---|
| `InpFastHorizon` | 6 | Short horizon in bars. It represents the scale on which pullbacks and local accelerations are observed. |
| `InpSlowHorizon` | 40 | Long horizon in bars. It represents the underlying tendency. Keep it at least six times the short horizon. |
| `InpAtrPeriod` | 40 | ATR period used in the normalisation of both horizons. |
| `InpDeltaLevel` | 0.50 | Threshold beyond which the divergence between the two horizons is considered significant and coloured. |
| `InpAppliedPrice` | PRICE_CLOSE | Price both momentum values are computed on. |
## Advantages / strengths
- It applies a statistically correct adjustment that the vast majority of multi horizon indicators omit.
- It allows separating a pullback inside the trend from a genuine regime change, by reading the sign of the two lines.
- The normalised values carry an absolute meaning: above one the move exceeds what volatility would justify.
- No repaint and a light computation, with the scale factors precomputed once at initialisation.
## Limitations and warnings
- The square root of time correction holds strictly for independent changes: on real markets, which have memory, it is an approximation.
- With horizons too close together the difference becomes noise dominated and loses all content.
- Three lines in the same subwindow require some habituation before they can be read quickly.
- In sideways phases both lines oscillate around zero and the difference keeps changing sign.
**No repaint:** values printed on a closed bar are never modified afterwards.
**Disclaimer.** This product is a technical analysis tool, not an automated trading system, and it offers no profit guarantee whatsoever. Financial markets carry the risk of total loss of the invested capital. Past performance is not indicative of future results. Every signal must be confirmed with your own analysis, a money management plan and prior testing on a demo account. The author is not responsible for trading decisions taken on the basis of this indicator.
## Suggested tags / keywords for MQL5
`momentum`, `dual horizon`, `normalization`, `square root of time`, `pullback`, `trend filter`, `no repaint`, `statistics`
