添加macd信号
2020/4/27 17:52:14
公式编写说明:
"MACD.DIF">0 AND "MACD.DEA">0 AND REF(BARSLASTCOUNT("MACD.MACD"<REF("MACD.MACD",1))>=3,1) AND "MACD.MACD">REF("MACD.MACD",1) AND "MACD.MACD">0;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);T:=BARSLAST(CROSS(DIFF,0));XG:CROSS(HHV(CROSS(DIFF,DEA),T)>=1,0.5) AND DEA>0;请老师将图2,图3的信号加到图1,并注上文字 ;图1为系统自带macd指标 谢谢老师 周末快乐
公式源码示例:
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
XG1:"MACD.DIF">0 AND "MACD.DEA">0 AND REF(BARSLASTCOUNT("MACD.MACD"<REF("MACD.MACD",1))>=3,1) AND "MACD.MACD">REF("MACD.MACD",1) AND "MACD.MACD">0;
T:=BARSLAST(CROSS(DIF,0));
XG2:CROSS(HHV(CROSS(DIF,DEA),T)>=1,0.5) AND DEA>0;
DRAWTEXT(XG1,XG1,'---2'),COLORGREEN;
DRAWTEXT(XG2,XG2,'---3'),COLORRED;
看股 吧公式 www.kangu ba.com
其它股票公式列表