McGinley Dynamic Indicator:
The McGinley Dynamic indicator is designed to follow prices,
avoiding whipsaws that are given when conventional Moving Averages are
Conventional Moving Averages have a fixed period and therefore a
fixed speed. As a result, price separation occurs when the price moves
rapidly which can lead to unwanted results. The McGinley Dynamic however
is designed to adjust speed inline with the market.
This tool can be used as a substitute for a conventional Moving Average as a trend confirmation indicator or crossover signal.
There are two inputs for this indicator:
The pictures below show comparisons between the McGinley Dynamic (Red
line) and a simple Moving Average (Blue line). The McGinley Dynamic
reacts to price increases sooner whilst also tracking closer to prices
and reducing whipsaws.
Author: Samuel Williams
Hi Samuel,I've been testing with your indicator and it appears that the Period setting is working backwards.I've been using an .mq4 McGinley indicator and the Period setting behaves the same as for an MA, the larger the number the flatter the curve becomes.The way this is working the 60% rule can't be applied.MT5 Build 1795
There's a difference to the original formula.
should we change the code to what you showed as "McGinley" ?
I believe i see the error, or oversight, it looks like the formula was taken from: https://www.investopedia.com/terms/m/mcginley-dynamic.asp
This has a mistake missing the 0.6 constant, and the indicator author has missed the power 4.
The correct formula as lippmaje quoted is in:
So if you want the McGinley Dynamic indicator as McGinley intended I would correct it as advised
mcg[i] = ma[i+1]+(price-ma[i+1])/MathMin(McgPeriod,MathMax(1,(McgConstant*McgPeriod*MathPow(price/ma[i+1],4)))); //Improved
mcg[i] = ma[i+1]+(price-ma[i+1])/(McgConstant*McgPeriod*MathPow(price/ma[i+1],4)); //Original
Please enable the necessary setting in your browser, otherwise you will not be able to log in.