TJ360:=C=HHV(C,150);{黑马线}
TS360:=BArslAst(TJ360);
HHC360:=REF(C,TS360);
RHHC360:=REF(HHC360,1);
TJ1360:=H L AND C RHHC360 ;
CS1360:=BARSLASTCOUNT(TJ1360);
CSS:=COUNT(CS1360=1,60);
MR:=CS1360=1 AND CSS=1;
HMXTS:=BARSLAST(MR);
黑马线:CONST(REF(C,HMXTS)),COLORFFFF00,LINETHICK2;
大周期:=ma(C,389),COLORWHITE,LINETHICK2;
STICKLINE((BARSLAST(MONTH!=REF(MONTH,1) OR DATETODAY(DATE)=1))+1=1,H#MONTH,L#MONTH,0,-1),COLORGREEN;
开盘:=(O-REF(C,1))/REF(C,1)*100,NODRAW,COLORLIGREEN;
现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
MA5角度:=ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.1416,NODRAW,COLOR5588FF;
获利:=WINNER(C)*100,NODRAW,COLORRED;
高:=REF(HHV(H,72),5);
龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;
MA5:MA(C,5),COLORWHITE;
MA10:MA(C,10),COLORYELLOW;
MA20:MA(C,20),COLORFF00FF;
MA60:MA(C,60),COLORGREEN,LINETHICK2;
IF(C MA60,MA60,DRAWNULL),COLORLIMAGENTA,LINETHICK3;
半年:MA(CLOSE,120),COLORGRAY;
年:MA(CLOSE,250),COLORRED,LINETHICK2;
半分:(C+O)/2,NODRAW,COLORYELLOW;
高量线:=V=HHV(V,20) AND H=HHV(H,20),NODRAW;
DRAWLINE(高量线,MAX(C,O),REF(高量线,1),REF(MAX(C,O),1),1),COLORYELLOW,LINETHICK2;
低量线:=V=LLV(V,20) AND L=LLV(L,20),NODRAW;
DRAWLINE(低量线,MIN(C,O),REF(低量线,1),REF(MIN(C,O),1),1),COLORGREEN,LINETHICK2;
操作:=MA(C,5);
生命线:=HHV(操作,13),LINETHICK2,COLORRED;{收盘破此线短逃}
愚公:=IF(1 10,HIGH*1.03,DRAWNULL),POINTDOT,LINETHICK9,COLORGREEN;
买线:=ema(C,4);
卖线:=EMA(SLOPE(C,20)*10+C,35);
DRAWICON(crOSS(买线,卖线),L*0.98,7);
DRAWICON(CROSS(卖线,买线),H*1.02,8);
TM:=1200823;
涨停:IF(DATE TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:=IF(DATE TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
最高%:(H/REF(C,1)-1)*100,COLORLIMAGENTA,NODRAW;
乖离5:H/MA5,COLORRED,NODRAW;
ZT:=C =涨停 AND PERIOD=5 AND H=C;
ZT1:=H =涨停 AND PERIOD=5 AND H
DT:=C =跌停 AND PERIOD=5 AND L=C;
DT1:=L =跌停 AND PERIOD=5 AND L
LB:=REF(EVERY(ZT,3),2) AND REF(H=HHV(H,20),1) AND H REF(H,1);
LBQ:=BARSLAST(LB);
打折:REF(H,LBQ+1)*0.7,NODRAW,COLORWHITE;
{涨停k线颜色设置}
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;
STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC;
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF;
STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;
{曾涨跌停打开K线颜色设置}
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888;
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;
DRAWTEXT(ZT AND DT1 AND PERIOD=5,L-0.03,'地天板'),COLORCC00CC;{从跌停到涨停}
DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,'天地板'),COLOR00CC00;{从涨停到跌停};
DRAWTEXT(DT1,L-0.09,'撬板'),COLORCC00CC;{从涨停到跌停};
DRAWTEXT(ZT1,H+0.03,'炸板'),COLOR00CC00;{从涨停到跌停};
假阴:=AMOUNT/V/100 REF(C,1) AND C
假阳:=AMOUNT/V/100 REF(C,1) AND C
阴:=REF(C =O,1) AND AMOUNT/V/100 REF(C,1) AND C
阳:=REF(C =O,1) AND H REF(O,1) AND C (REF(O-C,1))/3+REF(C,1) AND AMOUNT/V/100 REF(C,1) AND C
STICKLINE(假阴,O,C,0.2,0),COLORRED;{假阴柱};
STICKLINE(假阳,O,C,0.7,0),COLORLIGREEN;{假阳柱};
SLB:=EVERY(ZT,3);
KK2:=SUMBARS(REFX(SLB,1),1);
STICKLINE(KK2,REF(C,KK2-1),REF(C,KK2-1),5,0),COLORFFCC99;
龙回头天数:=SUMBARS(REFX(SLB,1),1)-2,NODRAW,COLORFF00FF;
DRAWTEXT(REFX(NOT(ZT),1) AND SLB,REF(C,1),'回头线');
STICKLINE(打折,打折,打折,5,0),COLORFFFF44;
Q3:=STRCAT(CON2STR(打折,2),'打折线');
DRAWTEXT(ISLASTBAR,打折,VARCAT(VARCAT('打折价',VAR2STR(打折,2)),'元'))COLORFFFF00;
大盘:=(INDEXC-REF(INDEXC,1))/REF(INDEXC,1);
逆势板:=大盘 0 AND ZT;
DRAWTEXT(逆势板,L,'逆'),COLORFFFF00;
DRAWICON((zig(3,5) REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1) =REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2) =REF(ZIG(3,5),3)),LOW*0.98,7);
DRAWICON((ZIG(3,5) REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1) =REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2) =REF(ZIG(3,5),3)),HIGH*1.02,8);
量能饱和:100*(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20)),NODRAW;
DRAwrECTREL(100,30,390,50,RGB(0,200,200));
DRAWRECTREL(100,30,90+CONST(量能饱和*300/100),50,RGB(250,105,0));
DRAWTEXT_FIX(1,0.004,0.03,0,STRCAT(STRCAT('量能饱和度: ',CON2STR(量能饱和,1)),' % ')),COLORYELLOW;