同花顺均衡图副图指标
源码
DRAWGBK(DATE>900103,STRIP(RGB(80,110,255),RGB(120,160,255),2));
AA:=(HHV(HIGH,120)-LLV(LOW,120))/30;
var1:=(2*CLOSE+HIGH+LOW)/4;
转换线:(HHV(H,8)+LLV(L,8))/2,colorred,LINETHICK2;
基准线:(HHV(H,22)+LLV(L,22))/2,colorgreen,linethick2;
先行线:REF(C,22),coloryellow;
云带A:REF((转换线+基准线)/2,22),ColorFFFFFF;
云带B:REF((HHV(H,44)+LLV(L,44))/2,22),ColorFFFFFF;
STICKLINE(云带A<云带B,云带A,云带B,0.1,0),ColorCEFFFF,POINTDOT;
STICKLINE(云带A>=云带B,云带A,云带B,0.1,0),COLORff00ff,POINTDOT;
DRAWTEXT(CROSS(转换线,基准线) AND var1<MIN(云带A,云带B),MIN(基准线,LOW)*0.995,'▲'),colorred;
DRAWTEXT(CROSS(基准线,转换线) AND var1>MAX(云带A,云带B),MAX(基准线,HIGH)+AA,'▼'),COLORFF9966;
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,10,0 ),COLORff7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORff9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORffbb00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORffcc00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORffdd00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORffee00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORffFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,10,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff;
var9Q:=C= HHV(C,4)AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);
varaQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
varbQ:=C=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<>HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);
varcQ:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
vardQ:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);
STICKLINE(vardQ,O,(O+C)/2,10,0),colorff1100;
STICKLINE(vardQ,O,(O+C)/2,6,0),colorff3300;
STICKLINE(vardQ,O,(O+C)/2,5,0),colorff5500;
STICKLINE(vardQ,O,(O+C)/2,4,0),colorff7700;
STICKLINE(vardQ,O,(O+C)/2,3,0),colorff9900;
STICKLINE(vardQ,O,(O+C)/2,2,0),colorffbb00;
STICKLINE(vardQ,O,(O+C)/2,1,0),colorffdd00;
AC:=AMOUNT/(VOL);
YY:=MA(AC,13);
LLL:=(C-YY)/YY*100;
MIDC :=
UPPERC:= MIDC + 2*STD(C,21);
LOWERC:= MIDC - 2*STD(C,21);
BBA:=(C-LOWERC)/(UPPERC-LOWERC);
BBC:=FORCAST(BBA,3);
LIFENGCYC:=(REF(LLL,1)<-15 AND REF(BBA,1)<0 AND LLL>REF(LLL,1));
DRAWTEXT(LIFENGCYC>0,LOW*0.99,'☆'),colorffffff;