{涨停}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),
COLOR00FFFF;
{跌停}
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),
COLORGREEN;
{蓝}
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3.3,0),COLORFF7700;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.3,0),COLORFFBB00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.8,0),COLORCYAN;
{红}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.3,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.8,0),COLORCC66FF;
{绿}
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR009900;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,2.4,0),COLOR00BB00;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,1.3,0),COLOR00DD00;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,0.8,0),COLOR00FF00;
{灰}
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR999999;
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,1.3,0),COLORDDDDDD;
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,0.8,0),COLORFFFFFF;
STICKLINE(金叉,OPEN,CLOSE,1,0),COLORYELLOW;
STICKLINE(死叉,OPEN,CLOSE,1,0),COLOR000099;
DRAWICON(VAR16,LOW-0.02,7);
DRAWICON(买1 OR 买2 OR 买3 OR 买4 OR 买5,LOW-0.01,1);
DRAWICON(死叉 OR VAR12 OR CROSS(40,VAR9),HIGH+0.01,2);
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8,'∠45升'),COLORWHITE;
VAR81:=1;
VAR82:=((((2*CLOSE)+HIGH)+LOW) / 4);
低金叉进:=20,COLORYELLOW,LINETHICK2;
高死叉出:=90,COLORGREEN,LINETHICK3;
VAR84:=LLV(LOW,5);
VAR85:=HHV(HIGH,4);
C1:=(EMA((((VAR82-VAR84)/(VAR85-VAR84))*100),4)*VAR81),COLORFF00FF,LINETHICK2;
C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR81),COLORFFFFFF,LINETHICK2;
条件:=CROSS(C1,C2) AND C1<40;
条件0:=CROSS(C2,C1) AND C1>90;
TJ1:=CROSS(C1,C2);
TJ2:=CROSS(C2,C1);
TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;
TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;
DRAWTEXT(条件0,H*1.02,'S'),COLORBLUE;
{DRAWTEXT(CROSS(C1,75),H*1.013,'险区'),COLORGREEN;}
DRAWTEXT(TJ3,L*0.98,'买底'),COLORFF00FF;
DRAWTEXT(TJ4,H*1.02,'逃顶'),COLORGREEN;
E1:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
B0:=(AH-AL)/40;
KB1:=H+B0;
KB2:=L-B0;
STICKLINE((E1+0)/34=FLOOR((E1+0)/34),KB2,KB2-0.8*B0,1,0),COLORYELLOW,LINETHICK3;
DRAWTEXT((E1+0)/34=FLOOR((E1+0)/34),KB2-B0,'时窗'),COLORYELLOW;
水平面:=EMA(CLOSE,89),COLOR3399FF;
AAA:=(3*C+H+L+O)/6;
短趋:= (8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
中趋:=(LLV(短趋,2)+LLV(短趋,4)+LLV(短趋,6))/3;
{STICKLINE(C>中趋,短趋,中趋,0,0),COLORYELLOW;}
TTJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>短趋;
立桩量:=FILTER(TTJ1,5);
TTJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));
突破:=TTJ2=1;
TTJ3:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(LOW,3),1,0)));
三天法则:=TTJ3=1;
成立:=三天法则 AND 突破;
条件成立:=FILTER(成立,3);
DRAWICON(条件成立,L*0.91,1);
DRAWTEXT(条件成立,L*0.91,'立桩'),COLORFF26FF;
MA(C,9),LINETHICK0,COLORYELLOW;
MA(C,21),LINETHICK0,COLORRED;
IF(MA(C,9)<REF(MA(C,9),1),MA(C,9),DRAWNULL),LINETHICK0,COLORBLUE;
IF(MA(C,21)<REF(MA(C,21),1),MA(C,21),DRAWNULL),LINETHICK0,COLORGREEN;
VAR90:=((((HHV((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),4)<0) AND ((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2)>REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),3)));
DRAWTEXT(VAR90,L*0.98,'短买'),COLORRED;
DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1)
AND C>O,L*0.98,'追加'),COLORMAGENTA;
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)>C AND
REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)
<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA")
>0,L-0.02,'★M'),COLORFF00FF;{MACD底背离}
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)>C AND
REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)<"KDJ.K" AND
CROSS("KDJ.K","KDJ.D"),L-0.10,'◎K'),COLORFF00FF;{KDJ底背离}
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)>C AND
REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)
<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2")
>0,L-0.18,'◆R');{RSI底背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)<C
AND REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)
>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF")
>0,H+0.16,'★M'),COLORGREEN;{MACD顶背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)<C
AND REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)
>"KDJ.K" AND CROSS("KDJ.D","KDJ.K")>0,H+0.08,'◎K');{KDJ顶背离}
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1))+1)<C AND
REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1))+1)>"RSI.RSI1"
AND CROSS("RSI.RSI2","RSI.RSI1")>0,H+0.04,'◆R'); |