指标: McGinley 动态指标

 

McGinley 动态指标:

McGinley 动态指标是由 John McGinley 开发的,并且他在1991年的市场技术联盟的技术分析杂志上做了简要介绍。这个指标的目的是解决传统均线中发现的缺陷,如价格分离和鞭锯。结果是一个显着的指标,遵循一个工具的平均价格,同时适应当前的市场速度。


作者: Samuel Williams

 
Automated-Trading:

麦金利动态指标

作者: Samuel WilliamsSamuel Williams

你好,Samuel,
我一直在使用您的指标进行测试,发现周期设置似乎在起反作用。
我一直在使用 .mq4 McGinley 指标,周期设置的表现与 MA 相同,数字越大,曲线越平坦。
这种工作方式无法应用 60% 规则。
MT5 版本 1795

McGinley = 54 / MA = 90

 

与原来的公式不同。

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

麦金利

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

与最初的配方有所不同。

麦金利


我们是否应该将代码改为您显示的 "McGinley"?

 
ali saqi:

我们是否应该将代码改为您显示的 "McGinley"?

不确定。我只是指出来让作者评论一下。不管这个公式是什么意思,它都与原来的公式不同,请参见 Investopedia。
 
lippmaje:

与最初的配方有所不同。

麦金利

我相信我看到了错误,或者说是疏忽,看起来这个公式来自:
https://www.investopedia.com/terms/m/mcginley-dynamic.asp

这个公式有误,漏掉了 0.6 常数,指标作者也漏掉了幂 4。


lippmaje 引用的正确公式是

https://www.investopedia.com/articles/forex/09/mcginley-dynamic-indicator.asp

因此,如果您想要麦金利动态指标,我建议您按照麦金利的意图进行修正

McGinley Dynamic Indicator Definition
McGinley Dynamic Indicator Definition
  • www.investopedia.com
The McGinley Dynamic indicator is a type of moving average that was designed to track the market better than existing moving average indicators. It is a technical indicator that improves upon moving average lines by adjusting for shifts in market speed. John R. McGinley, a market technician, is the inventor of the eponymous indicator. Key...
 
if(useImprovedFormula)
          {
           mcg[i]   = ma[i+1]+(price-ma[i+1])/MathMin(McgPeriod,MathMax(1,(McgConstant*McgPeriod*MathPow(price/ma[i+1],4)))); //改进
          }
          else
          {
            mcg[i]   = ma[i+1]+(price-ma[i+1])/(McgConstant*McgPeriod*MathPow(price/ma[i+1],4)); //原件
          }
下面是麦吉利原始公式和改进版公式的 mql4 代码示例。