同花顺花神MACD指标公式
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个
//计算MACD
DIF=(EMA(CLOSE,12)-EMA(CLOSE,26))*100; //求DIF
DEA=EMA(DIF,9); //求DEA
MACDA = (DIF-DEA)*2;
MACDDIF= MACDA - REF(MACDA ,1);
EMAMACDDIF: EMA(MACDDIF,3),COLORSTICK;
MACD=(DIF-DEA)*2; //求MACD并显示量柱
MACD1 = REF(MACD,1);
MACD2 = REF(MACD,2);
MACD3 = REF(MACD,3);
MACD_OLD2 = (MACD1+MACD2)/2;
MACD_OLD3 = (MACD1+MACD2+MACD3)/3;
BUYIN= (MACD<0) AND (CROSS(MACD,MACD_OLD3)) ;
SALEOUT= (MACD>0) AND (CROSS(MACD1,MACD)) ;
DRAWICON( BUYIN AND NOT(REF(BUYIN,1)),0,1);
DRAWICON( SALEOUT AND NOT(REF(SALEOUT,1)),0,2);
选股票看什么指标最好 >股票指标网
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个
//计算MACD
DIF=(EMA(CLOSE,12)-EMA(CLOSE,26))*100; //求DIF
DEA=EMA(DIF,9); //求DEA
MACDA = (DIF-DEA)*2;
MACDDIF= MACDA - REF(MACDA ,1);
EMAMACDDIF: EMA(MACDDIF,3),COLORSTICK;
MACD=(DIF-DEA)*2; //求MACD并显示量柱
MACD1 = REF(MACD,1);
MACD2 = REF(MACD,2);
MACD3 = REF(MACD,3);
MACD_OLD2 = (MACD1+MACD2)/2;
MACD_OLD3 = (MACD1+MACD2+MACD3)/3;
BUYIN= (MACD<0) AND (CROSS(MACD,MACD_OLD3)) ;
SALEOUT= (MACD>0) AND (CROSS(MACD1,MACD)) ;
DRAWICON( BUYIN AND NOT(REF(BUYIN,1)),0,1);
DRAWICON( SALEOUT AND NOT(REF(SALEOUT,1)),0,2);
选股票看什么指标最好 >股票指标网
精彩评论