Momentum Indicator Calculation is Wrong or Wrong formula Description?? I'm 100% Sure!

 

Both MT4 and MT5 Momentum Calculation is Wrong or Wrong formula Description??

Here's the formula in the Official MetaTrader CodeBase:

Calculation
Momentum is calculated as a ratio of today’s price to the price n periods ago:

MOMENTUM = CLOSE (i) / CLOSE (i - n) * 100

Where:
CLOSE (i) — the close price of the current bar;
CLOSE (i - n) — the close price n bars ago.

I tried to create this momentum indicator using that MetaTrader Formula but I'm shock to know that formula is not correct on what MetaTrader put in Codebase Formulas.

The Current Close should be Current SMA not Current Price.

Here's my formula:

(Current SMA / Previous SMA) * 100

OR

(iMA(Symbol(), Period(), 10, 0, MODE_SMA, PRICE_CLOSE, i) / iMA(Symbol(), Period(), 10, 0, MODE_SMA, PRICE_CLOSE, i+1)) * 100;


I can't contact Developers because Service Desk menu is missing.

 
Don't all codes in the codebase have their own discussion thread?
 
Keith Watford:
Don't all codes in the codebase have their own discussion thread?

Yes, momentum for MT5 is here: https://www.mql5.com/en/code/40

And, of course, the code is provided in Indicators/Examples.

Musngi:

The Current Close should be Current SMA not Current Price.

I have never known momentum to have an SMA in it. It's either a difference or a ratio of the current close to a prior close.

Calculation:
M = CP - CPn
Or
M = (CP / CPn) * 100