Momentum Curvature
- Индикаторы
- Версия: 1.0
- Активации: 5
# Momentum Curvature - Acceleration versus velocity
*Category: Momentum | Difficulty: intermediate | Window: separate window below the chart | Markets: Universal (Forex, indices, commodities, crypto, stocks) | Suggested timeframes: M15, M30, H1, H4, D1*
## Short description
> Measures price acceleration, the second derivative of the smoothed series, and compares it with velocity. It detects loss of thrust before direction changes.
### Overview
Anyone who drives knows the brake pedal acts on acceleration long before speed turns negative. The same principle holds in markets and Momentum Curvature makes it visible. The indicator smooths price with an exponential average, computes its first derivative, which is velocity, and then the second derivative, which is curvature or acceleration. Both are expressed in ATR units per bar, so they are comparable across instruments. The combination of the two signs defines four market states, and the most interesting are those where velocity and curvature have opposite signs: these are the deceleration phases that precede pauses and reversals, and which no velocity-only indicator can distinguish.
### How the calculation works
1. The applied price is smoothed with an exponential average of period InpSmoothPeriod: differentiating a raw series would produce only noise.
2. Velocity is the difference between this bar average and the previous bar average.
3. Curvature is the difference between the current velocity and the previous one, that is the discrete second derivative.
4. Both quantities are divided by the ATR over InpAtrPeriod bars, producing values in volatility units per bar.
5. The curvature histogram is green only when velocity and curvature are both positive, red when both are negative.
6. All other cases, the decelerations, stay grey: this is the configuration the indicator is designed to make noticeable.
### How to use it
- Read the blue velocity line together with the curvature bars: the combination of the two signs is the information, not either alone.
- Positive velocity with negative curvature is the signature of a slowing advance: the moment to stop adding to the position.
- Negative velocity with positive curvature signals a decline losing force: the context in which to look for a low, not earlier.
- Wide green bars identify pure acceleration phases, statistically the best for a continuation entry.
- Raise InpSmoothPeriod if curvature looks too nervous: the second derivative amplifies noise more than any other quantity.
### Who it is for and on which timeframes
It suits traders who actively manage positions and need to anticipate slowdowns rather than suffer them. It works well from M15 to D1, with longer smoothing on lower timeframes. No formal mathematical training is required, but one must accept that the second derivative is intrinsically noisier than the first: those looking for an always clean signal will be disappointed, those looking for an early warning will find information no velocity oscillator provides.
### Practical example of reading a signal
On EURJPY H1 price has been rising for twenty bars. The velocity line sits clearly above zero and the curvature bars are green: pure acceleration, the long position is held. Four bars later price keeps making new highs, velocity is still positive, but the curvature bars slip below zero and turn grey. Price still rises, but more and more slowly. A trader reading only price or only velocity sees no change; one reading curvature knows the thrust is fading and moves the stop below the last low. Six bars later velocity crosses zero and the correction truly begins.
## Input parameters
| Parameter | Default | Description |
|---|---|---|
| `InpSmoothPeriod` | 12 | Period of the smoothing applied before differentiating. It is the key parameter: low values make curvature unusable through noise, high values make it late. |
| `InpAtrPeriod` | 40 | ATR window normalising velocity and curvature, making them comparable across different instruments. |
| `InpFlatCurve` | 0.02 | Minimum curvature, in ATR, for the histogram to be coloured. Raising it filters out marginal accelerations. |
| `InpAppliedPrice` | PRICE_CLOSE | Price the smoothing is applied to. |
## Advantages / strengths
- It provides a slowdown warning that systematically precedes the change in the sign of velocity.
- Reading two quantities together defines four distinct market states instead of the usual two.
- ATR normalisation: the same threshold works on indices, currencies and commodities with no recalibration.
- No repaint and a very light recursive computation.
## Limitations and warnings
- The second derivative amplifies noise: without adequate smoothing the histogram flips sign constantly.
- Smoothing introduces lag, so the early warning still comes after the actual inflexion point of price.
- In sideways phases both quantities oscillate around zero and the four state reading loses all meaning.
- It provides no operational levels and no size indication: it says how the thrust is changing, not where price will go.
**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`, `acceleration`, `curvature`, `derivative`, `oscillator`, `early warning`, `no repaint`, `atr`
