顺水外汇EA交易网MT4
标题:
请大家帮忙编辑一个MT4指标,谢谢
[打印本页]
作者:
krischen
时间:
2018-1-11 14:53
标题:
请大家帮忙编辑一个MT4指标,谢谢
飞狐源码:
DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA :=EMA(DIFF,5);
MACD :=2*(DIFF-DEA);
DD:=(MACD/2+(DEA*4/6))/(1-2/6);
AA
[attach]20665[/attach]
DD*13*27-27*11*EMA(C,12)+13*25*EMA(C,26))/(2*(27-13));
翻译MT4:
limit=Bars-counted_bars;
for(i=0,y=0;i<limit;i++)
{
if (Time
<TimeArray[y]) y++;
EMA1
=iMA(NULL,0,12, 0,1,0,i);
EMA2
=iMA(NULL,0,26, 0,1,0,i);
DIFF
=EMA1
-EMA2
;
}
limit=MathMin(limit,5000+5);
for(i=0; i<limit; i++)
{
DEA
=iMAOnArray(DIFF,Bars,5,0,1,i);
}
limit=MathMin(limit,5000+5);
for(i=0; i<limit; i++)
{
MACD
=2*(DIFF
-DEA
);
DD
=(MACD
/2+(DEA
*4/6))/(1-2/6);
AA
=(DD
*13*27-27*11**EMA1
+13*25*EMA2
)/(2*(27-13));
}
问题是翻译之后显示的数值完全不对,相差很大,请高手帮忙看看那出的问题,谢谢
作者:
EUR168
时间:
2018-1-11 16:15
太棒了,谢谢分享。
欢迎光临 顺水外汇EA交易网MT4 (http://waterforex.com/)
Powered by Discuz! X3.2