以下是通达信四色彩带副图源码(无源码的请下载附件导入)
LG:=C-REF(C,1);
AA1:=LG-REF(LG,7);
AA2:=LG-REF(LG,18);
AA3:=LG-REF(LG,29);
AA4:=LG-REF(LG,47);
AA5:=LG-REF(LG,76);
AA6:=LG-REF(LG,123);
AA7:=LG-REF(LG,199);
BB1:=(AA1+AA2+AA3+AA4+AA5+AA6+AA7);
U:=BB1-REF(BB1,1);
BB2:=SMA(U,5,1);
YY1:=BB1-REF(BB1,1);
绿带1:EMA(EMA(EMA(YY1,8),8),14),COLOR00FA00,LINETHICK4;
绿带2:EMA(EMA(绿带1,3),3),COLORFFFF00,LINETHICK3;
红带1:EMA(EMA(绿带2,3),3),COLORRED,LINETHICK3;
红带2:EMA(红带1,11),COLORFF00FF,LINETHICK3;
BB3:=REF(MA(H,1),15)>REF(MA(H,60),15) AND 绿带2<0;
DD1:=MA(红带1,1)>REF(MA(红带1,1),1);
DD2:=MA(绿带2,1)>REF(MA(绿带2,1),1);
DD3:=MA(绿带1,1)>REF(MA(绿带1,1),1);
DD4:=MA(红带2,1)>REF(MA(红带2,1),1);
DRAWBAND(红带2,RGB(0,0,220),红带1,RGB(252,10,265));
DRAWBAND(绿带1,RGB(255,255,0),绿带2,RGB(50,100,10));
DRAWTEXT(FILTER(CROSS(绿带1,绿带2),5),绿带1-0.04,'买'),COLORFF00FF;
DRAWTEXT(FILTER(CROSS(绿带2,绿带1),5),绿带1+0.04,'卖'),COLORWHITE;
买点:FILTER(CROSS(绿带1,绿带2),5)*0.01,COLOR808080;
713511229.png
|