飞狐MACD镜像指标公式
2014-12-15 21:26:11点击:
INPUT:P(26,1,100),S(12,1,100),M(9,1,100);
C0:=REF(C,BARSCOUNT(C)-1);
O0:=REF(O,BARSCOUNT(C)-1);
ZC:=(C)/O0;
收:=O0*(1/ZC),LINETHICK;
DIFF := EMA(收,S) - EMA(收,P),colorDDDDDD;
DEA := EMA(DIFF,M),color50ffFF;
mdea:TMA(dea,0.618,0.382), color50ff50;
FILLRGN(DEA>mdea,dea,mdea),color303088;
FILLRGN(DEA<mdea,dea,mdea),color208020;
PARTLINE(DEA>mdea,dea),color0000dd;
PARTLINE(DEA>mdea,mdea),color00dddd;
PARTLINE(DEA<mdea,dea),color50ee50;
PARTLINE(DEA<mdea,mdea),colordd9960;
DIFF_:DIFF;
MACD : 2*(DIFF-DEA), COLORSTICK;
C0:=REF(C,BARSCOUNT(C)-1);
O0:=REF(O,BARSCOUNT(C)-1);
ZC:=(C)/O0;
收:=O0*(1/ZC),LINETHICK;
DIFF := EMA(收,S) - EMA(收,P),colorDDDDDD;
DEA := EMA(DIFF,M),color50ffFF;
mdea:TMA(dea,0.618,0.382), color50ff50;
FILLRGN(DEA>mdea,dea,mdea),color303088;
FILLRGN(DEA<mdea,dea,mdea),color208020;
PARTLINE(DEA>mdea,dea),color0000dd;
PARTLINE(DEA>mdea,mdea),color00dddd;
PARTLINE(DEA<mdea,dea),color50ee50;
PARTLINE(DEA<mdea,mdea),colordd9960;
DIFF_:DIFF;
MACD : 2*(DIFF-DEA), COLORSTICK;