同花顺MACD正负能量指标公式:
参考大盘和成交量、均线和其他指标,用法同MACD
DI:=(EMA(CLOSE,12) - EMA(CLOSE,26))*200;
DE:=EMA(DI,9);
MACD:=2*(DI-DE);
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*400-200;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,8,0),colorred;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,8,0),colormagenta;
Zero : 0;
gj:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
L4:=LLV(gj,4);
H4:=HHV(gj,4);
A9:=(HIGH+LOW)/2;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CI:(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
C2:MA(CI,4);
C3:MA(CI,10),linethick1;;
FILLRGN(CI,C2,CI>C2,RGB(0,255,0,),CI
FILLRGN(CI,C3,CI>C3,RGB(255,0,0,),CI
FILLRGN(CI,C2,CI>C2,RGB(0,255,0,),CI
FILLRGN(CI,C3,CI>C3,RGB(255,0,0,),CI
DIF:EMA(CLOSE,12)-EMA(CLOSE,150);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
启动点:=MACD<0 AND MACD>REF(MACD ,1) AND REF(MACD ,1)
STICKLINE(启动点,0.4,MACD,8,0),coloryellow;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR0000BB;
启动点A:0,coloryellow;
DRAWICON(启动点,2,11);
同花顺抓黑马指标公式
主打波段,横盘的均线系统粘合较大就不适合了。针对均线间隔较大的,指标带文字提示,待发出信号后分仓进场,注意控制风险。
A1:3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
黑码线:EMA(A1,5),LINETHICK2,COLOR6600FF;
A2:=(黑码线-REF(黑码线,1))/REF(黑码线,1)*100;
A3:=EMA(C,5);
A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
趋势线:(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2)),LINETHICK2,coloryellow;
A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*100;
DRAWTEXT(FILTER(REF(黑码线,1)>90 AND A2<0,7),黑码线,'跑'),COLOR00FF00;
DRAWTEXT(CROSS(A1,黑码线)AND 黑码线
DRAWTEXT(CROSS(黑码线,A5)AND 趋势线<80,黑码线,'追涨');
DRAWTEXT(CROSS(趋势线,0)AND 黑码线<40,5,'大黑码');
底部:(A2<-10 AND A2>REF(A2,1))*25,colorred;
DRAWICON(底部 AND A3>REF(A3,1),25,4);