手机端
当前位置:爱约股 > 公式技巧 > MACD为什么金叉不显示红色箭头

MACD为什么金叉不显示红色箭头

 网友求助:

DIFF :(EMA(CLOSE,12)-EMA(CLOSE,26))*100/EMA(CLOSE,26),COLORRED;
DEA : EMA(DIFF,9),COLORRED,LINETHICK1;
DIF:IF(DIFF<REF(DIFF,1),DIFF,DRAWNULL),COLORGREEN;
ADEA:IF(DEA<REF(DEA,1),DEA,DRAWNULL),COLORGREEN,LINETHICK1;
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK1;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));

STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0,0),COLORFF00FF;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,0,0)COLOR00FF00;
STICKLINE(MACD>REF(MACD,1)AND MACD,0,MACD,0,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,0,0),COLORRED;

向上:=IF(DIF>=REF(DIF,1),DIF,DRAWNULL),LINETHICK2,COLORRED;
向下:=IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(DIF,DEA) AND DIF>REF(DIF,1) AND DEA<0,DIF,1)AND(A1);
DRAWICON(CROSS(DEA,DIF) AND DIF<REF(DIF,1) AND DEA>0,DEA,2);


请问为什么金叉不显示红色箭头?请高手做一个金叉选股公式(红色箭头)
 

 

解答如下:

DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
CROSS(DEA,REF(DEA,1));
========================


DRAWICON(CROSS(DIF,DEA) AND DIF>REF(DIF,1) AND DEA<0,DIF,1)AND(A1);
如果按原公式改选股,他要求的是0下金叉
如下:
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
CROSS(DEA,REF(DEA,1)) and dea<0 and A1;

TAG:
分享至:

相关推荐