同花顺我的波段主图指标
源码
S1:=EMA(C,3)*2 - EMA(EMA(C,3),3), coloryellow;
S2:=EMA(C,6)*2 - EMA(EMA(C,6),6), coloryellow;
S3:=EMA(C,9)*2 - EMA(EMA(C,9),9), coloryellow;
S4:=EMA(C,14)*2 - EMA(EMA(C,14),14), coloryellow;
S5:=EMA(C,19)*2 - EMA(EMA(C,19),19), coloryellow;
均线:(S1+S2+S3+S4+S5)/5, ColorFF17FF, LINETHICK2;
L1:EMA(C,27)*2 - EMA(EMA(C,27),27),Color1AFFFF;
L2:EMA(C,34)*2 - EMA(EMA(C,34),34),Color1EFF1E;
L3:EMA(C,41)*2 - EMA(EMA(C,41),41),ColorFFFF2D;
L4:EMA(C,48)*2 - EMA(EMA(C,48),48),ColorFFFFFF;
L5:EMA(C,55)*2 - EMA(EMA(C,55),55),Color1E1EFF;
var1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
Var2:=REF(Var1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var3:=REF(Var2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var4:=REF(Var3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var5:=REF(Var4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var6:=REF(Var5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var7:=REF(Var6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var8:=REF(Var7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var9:=REF(Var8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VarA:=REF(Var9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VarB:=REF(VarA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VarC:=REF(VarB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VarD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VarE:=REF(VarD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VarF:=REF(VarE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var10:=REF(VarF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var11:=REF(Var10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var12:=REF(Var11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var13:=REF(Var12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var14:=REF(Var13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var15:=REF(Var14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var16:=REF(Var15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var17:=REF(Var16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
Var18:=REF(Var17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
Var19:=REF(VarD OR VarE OR VarF OR Var10 OR Var11 OR Var12 OR Var13 OR
Var14 OR Var15 OR Var16 OR Var17 OR Var18,1) AND Var1;
DRAWTEXT(Var19,L,'B'),colorwhite;
Var1A:=REF(Var1 OR Var2 OR Var3 OR Var4 OR Var5 OR Var6 OR Var7 OR
Var8 OR Var9 OR VarA OR VarB OR VarC,1) AND VarD;
DRAWTEXT(Var1A,H*1.02,'S'),coloryellow;
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,0.8,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,0.8,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);
STICKLINE(var9Q,C,(O+C)/2,10,0),color000055;
STICKLINE(var9Q,C,(O+C)/2,6,0),color000066;
STICKLINE(var9Q,C,(O+C)/2,5,0),color000077;
STICKLINE(var9Q,C,(O+C)/2,4,0),color000099;
STICKLINE(var9Q,C,(O+C)/2,3,0),color0000bb;
STICKLINE(var9Q,C,(O+C)/2,2,0),color0000dd;
STICKLINE(var9Q,C,(O+C)/2,0.8,0),color0000ff;
varaQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
STICKLINE(varaQ,C,(O+C)/2,10,0),colorff11ff;
STICKLINE(varaQ,C,(O+C)/2,6,0),colorff33ff;
STICKLINE(varaQ,C,(O+C)/2,5,0),colorff55ff;
STICKLINE(varaQ,C,(O+C)/2,4,0),colorff77ff;
STICKLINE(varaQ,C,(O+C)/2,3,0),colorff99ff;
STICKLINE(varaQ,C,(O+C)/2,2,0),colorffbbff;
STICKLINE(varaQ,C,(O+C)/2,0.8,0),colorffddff;
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);
STICKLINE(varbQ,C,(O+C)/2,10,0),color333333;
STICKLINE(varbQ,C,(O+C)/2,6,0),color555555;
STICKLINE(varbQ,C,(O+C)/2,5,0),color777777;
STICKLINE(varbQ,C,(O+C)/2,4,0),color999999;
STICKLINE(varbQ,C,(O+C)/2,3,0),colorbbbbbb;
STICKLINE(varbQ,C,(O+C)/2,2,0),colordddddd;
STICKLINE(varbQ,C,(O+C)/2,0.8,0),colorffffff;
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);
STICKLINE(varcQ,O,(O+C)/2,10,0),color003300;
STICKLINE(varcQ,O,(O+C)/2,6,0),color005500;
STICKLINE(varcQ,O,(O+C)/2,5,0),color007700;
STICKLINE(varcQ,O,(O+C)/2,4,0),color009900;
STICKLINE(varcQ,O,(O+C)/2,3,0),color00bb00;
STICKLINE(varcQ,O,(O+C)/2,2,0),color00dd00;
STICKLINE(varcQ,O,(O+C)/2,0.8,0),color00ff00;
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,0.8,0),colorffdd00;
AC:=AMOUNT/(VOL);
YY:=MA(AC,9);
LLL:=(C-YY)/YY*100;
MIDC :=
UPPERC:= MIDC + 2*STD(C,14);
LOWERC:= MIDC - 2*STD(C,14);
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;