Indicators: McGinley Dynamic Indicator

To add comments, please log in or register
Automated-Trading
153028
Automated-Trading  

McGinley Dynamic Indicator:

The McGinley Dynamic indicator is designed to follow prices, avoiding whipsaws that are given when conventional Moving Averages are used.

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:

  • MD_Period - In the same way you choose a period for a Moving Average, choose the period for this indicator. Make this 60% of the period you would otherwise use in a Moving Average. So if your MA period is 20, set this value to 12 for comparative indicator.
  • MD_smoothing - This adjusts the sensitivity of the line, the default value is 125.

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.

Figure 1 - McGinley Dynamic vs SMA

Figure 2 - MD vs SMA

Author: Samuel Williams

drayzen
651
drayzen  
Automated-Trading:

McGinley Dynamic Indicator:

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

McGinley = 54 / MA = 90

lippmaje
1070
lippmaje  

There's a difference to the original formula.

You:

MDBuffer[i]=MDBuffer[i-1]+(close[i]-MDBuffer[i-1])/(MD_smooth*(close[i]/MDBuffer[i-1]));

McGinley:

MDBuffer[i]=MDBuffer[i-1]+(close[i]-MDBuffer[i-1])/(0.6*MD_smooth*MathPow(close[i]/MDBuffer[i-1],4));
ali saqi
7
ali saqi  
lippmaje:

There's a difference to the original formula.

You:

McGinley:


should we change the code to what you showed as "McGinley" ?

To add comments, please log in or register