以下是通达信适合股票期货的多空主图指标 源码
适合股票期货的多空主图指标 源码 通达信 贴图
HH1:=IF(H<REF(H,1) AND REF(H,1)<REF(H,2),REF(H,2),0);
LL1:=IF(L>REF(L,1) AND REF(L,1)>REF(L,2),REF(L,2),0);
HH2:=VALUEWHEN(HH1>0,HH1);
LL2:=VALUEWHEN(LL1>0,LL1);
K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IF(K2=1,HH2,LL2);
G1:=VALUEWHEN(ISLASTBAR,G);
DRAWNUMBER(L>0,G1,G1),COLORCYAN;
W1:=K2;
W2:=OPEN-CLOSE;
HT:=IF(OPEN>CLOSE,OPEN,CLOSE);
LT:=IF(OPEN<CLOSE,OPEN,CLOSE);
STICKLINE(W1=1,HIGH,HT,0,1),COLORCYAN;
STICKLINE(W1=1,LOW,LT,0,1),COLORCYAN;
STICKLINE(W1=-3,HIGH,HT,0,1),COLORRED;
STICKLINE(W1=-3,LOW,LT,0,1),COLORRED;
STICKLINE(W1>0,OPEN,CLOSE,3,1),COLORCYAN;
STICKLINE(W1<=0,OPEN,CLOSE,3,1),COLORRED;
STICKLINE(W2>0 AND W1<=0,OPEN,CLOSE,3,0),COLORRED;
STICKLINE(W2>0 AND W1>0,OPEN,CLOSE,3,0),COLORCYAN;
IF(K2=1,G,DRAWNULL),COLORGREEN,DOTLINE;
IF(K2=-3,G,DRAWNULL),COLORRED,DOTLINE;
DRAWTEXT(CROSS(W1,0),HT,’空’),COLORGREEN;
DRAWTEXT(CROSS(0,W1),LT,’多’),COLORYELLOW;
火车:DRAWTEXT(CROSS(0,W1),LT,’多’),COLORYELLOW;
评论(0)