DRAWGBK(C>0,RGB(0,0,110),RGB(0,25,0),0,' ',0);
总涨幅:(H-LLV(L,180))/LLV(L,180)*100,NODRAW,COLORYELLOW;Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,DYBLOCK);Z3:=STRCAT(Z2,' ');DRAWTEXT_FIX(ISLASTBAR,0.35,0.0,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;获利筹码:IF(WINNER(CLOSE),WINNER(CLOSE)*100,0),NODRAW;MA5:MA(CLOSE,5),COLORWHITE,LINETHICK1{,DOTLINE};MA10:MA(CLOSE,10),COLORGREEN,LINETHICK1{,DOTLINE};MA20:MA(CLOSE,20),COLORLIBLUE,LINETHICK1{,DOTLINE};MA30:MA(CLOSE,30),COLORLIRED,LINETHICK1{,DOTLINE};MA60:MA(CLOSE,60),COLORMAGENTA,LINETHICK1{,DOTLINE};{MA250:MA(CLOSE,250),COLORLIMAGENTA,LINETHICK1{,DOTLINE;}高30:REFDATE(HHV(H,30),DATE),COLORGRAY,DOTLINE;底30:REFDATE(LLV(L,30),DATE),COLORGRAY,DOTLINE;高90:REFDATE(HHV(H,90),DATE),COLORGRAY,DOTLINE;底90:REFDATE(LLV(L,90),DATE),COLORGRAY,DOTLINE;{筹码峰}STICKLINE(ISLASTBAR,HHV(C,5),HHV(C,5),80,1)COLORBBBBBB;STICKLINE(ISLASTBAR,HHV(C,5)*0.95,HHV(C,5)*0.95,80,1)COLORBBBBBB;
AH:=HHV(H,60);AL:=LLV(L,60);A0:=(AH-AL)/21;{九转}A01:=C>REF(C,4);NT:=BARSLASTCOUNT(A01);TJ11:=NT=9;TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;DRAWTEXT(AY>0,H+1.1*A0,VAR2STR(AY,0)),COLORYELLOW;DRAWTEXT(NT=9,H+1.1*A0,'9'),COLORGREEN;DRAWTEXT(NT=13,H+1.1*A0,'13'),COLORGREEN;DRAWTEXT(NT=18,H+1.1*A0,'18'),COLORGREEN;B1:=C<REF(C,4);NT0:=BARSLASTCOUNT(B1);TJ21:=NT0=9 ;TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;DRAWTEXT(AY1>0,L-1*A0,VAR2STR(AY1,0)),COLORLIGREEN;DRAWTEXT(NT0=9,H+1.1*A0,'9'),COLORYELLOW;DRAWTEXT(NT0=13,H+1.1*A0,'13'),COLORYELLOW;DRAWTEXT(NT0=18,H+1.1*A0,'18'),COLORYELLOW;ZF:=(C-REF(C,1))/REF(C,1)*100;假阳线:=C>O AND ZF<0 AND O<REF(L,1);STICKLINE(假阳线,O,C,0.5,0),COLORMAGENTA;
DRAWKLINE(H,O,L,C);VAR93:=LLV(HIGH,240);VAR94:=100*(CLOSE-VAR93)/VAR93;VAR95:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;VAR96:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;VAR97:=0;VAR98:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;VAR99:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;VAR910:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR911:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR912:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR913:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR914:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR915:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR916:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR917:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR918:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR919:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR910;买2:=(VAR911+VAR913+VAR915+VAR917);卖1:=(VAR912+VAR914+VAR916+VAR918);B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;DRAWTEXT(买1>0 OR 买2>0,LOW*0.97,'买'),COLORYELLOW;S:IF(卖1>0,HIGH*1.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;DRAWTEXT(卖1>0,HIGH*1.03,'卖'),COLORGREEN;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.99,1) ;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.01,2);ZB:=EMA(EMA(VAR93,5),5)*3, COLORSTICK;VARAZ:=IF(VAR99 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);K:=EMA(VAR97,5)*2, , COLORFF00FF;D:=EMA(K,5), , COLORWHITE;J:=K*3-D*2, ,COLORYELLOW;VARBZ:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;HS:=VOL/CAPITAL*100,COLORGREEN;VAREZ:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VARFZ:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);DRAWTEXT(VAR911 AND COUNT(VAR911,30)=1,H*1.02,'进'),LINETHICK1,COLORLIRED;VAR1AA:=IF(VAREZ>0,VAREZ,0);VAR1BB:=IF(VAR914>=200 AND VAR913>=150,15,IF(VAR914<=-200 AND VAR913<=-150,-15,VAR916))+60;VAR1CC:=VAR1AA>48 AND VAR1BB>60 AND VAR919<100;DRAWTEXT(VAR1CC AND COUNT(VAR1CC,30)=1,H*1.03,'顶') COLORWHITE;
均价线:=AMOUNT/V/100;C2:=REF(C,1);涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORYELLOW;STICKLINE(涨停,H,L,0,0),COLORYELLOW;{B11:='┄┄┄┄┄';DRAWTEXT(均价线 AND 涨停,均价线,B11),COLORGREEN;}{B13:='┄┄┄┄┄';DRAWTEXT((O+C)/2 AND 涨停,(O+C)/2 ,B13),COLORMAGENTA;}{B12:='┄┄┄┄┄';DRAWTEXT(涨停,L,B12),COLORWHITE;};
XA1:=IF(DATE<99999999,1,DRAWNULL);MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;MXD:=IF((DATETODAY(DATE))<99999999,1,DRAWNULL);WH1:=IF(L=LLV(L,9),L,0)*MXD;WH2:=CONST(BARSLAST(WH1!=0))*MXD;WH3:=CONST(IF(WH2=0,H,REF(H,WH2)))*MXD;WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1)*MXD;WH5:=CONST(IF(WH4=0,H,REF(H,WH4)))*MXD;WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1)*MXD;WH7:IF(CURRBARSCOUNT<=WH2+10,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL)*MXD,COLORYELLOW,DOTLINE;DRAWTEXT(ISLASTBAR,WH7,'进场')*XA1,COLORYELLOW;
{压力}H01:=REF(C,9)=HHV(C,2*9+1);H02:=FILTER(H01,9);H03:=BACKSET(H02,9+1);H04:=FILTER(H03,9);小压:=REF(C*0.999,BARSLAST(H04)),COLORWHITE,NODRAW;H05:=ABS(REF(小压,1)-小压)>小压*0.075 AND H04;小压2:REF(C*0.999,BARSLAST(H05)),,NODRAW;STICKLINE(C*0.999,小压2,小压2,1,1),COLORGREEN;
P:=21;H001:=IF(H=HHV(H,P),H,DRAWNULL);H002:=CONST(BARSLAST(H001!=DRAWNULL));H003:=CONST(IF(H002=0,L,REF(L,H002)));H004:=CONST(REF(BARSLAST(L<H003),H002+1)+H002+1);H005:=CONST(IF(H004=0,L,REF(L,H004)));H006:=CONST(REF(BARSLAST(L<H005),H004+1)+H004+1);止损:IF(CURRBARSCOUNT<=H002+P,CONST(IF(H006=0,L,REF(L,H006))),DRAWNULL),DOTLINE,LINETHICK1,COLORLIBLUE;DRAWTEXT(ISLASTBAR,止损,'止损')*XA1,COLORLIBLUE;
{分析}VA1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VA2:=SMA(ABS(LOW-VA1),13,1)/SMA(MAX(LOW-VA1,0),10,1);VA3:=EMA(VA2,10)/100;VA4:=LLV(LOW,33);VA5:=EMA(IF(LOW<=VA4,VA3,0),3);洗盘1:=IF(VA5<REF(VA5,1),VA5,0),COLORGREEN,NODRAW;拉升:=IF(VA5>REF(VA5,1) ,VA5,0),COLORRED,NODRAW;VA6:=IF(VA5>=100,100,VA5);XP:=REF(洗盘1,1);LS:=拉升;XPLS:=(XP AND LS);VR3:=(CLOSE+HIGH+LOW)/3;VR4:=EMA(VR3,10);VR5:=REF(VR4,1);主力线:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK1,POINTDOT;VAR03:=MA(CLOSE,13);VAR4:=(100-ABS((CLOSE-VAR03)/VAR03*100))/100;VAR05:=LLV(LOW,75);VAR6:=HHV(HIGH,75);VAR7:=(VAR6-VAR05)/100;VAR8:=SMA((CLOSE-VAR05)/VAR7,20,1);VARA:=3*VAR8-2*SMA(VAR8,15,1);吸筹A:=(100-VARA)/100,COLOR0099FF,LINETHICK2;吸筹:=IF(吸筹A>1.09*REF(吸筹A,1),1,0),COLORRED,NODRAW;大底:=EXIST(CROSS( 吸筹A,1),6),NODRAW,COLORMAGENTA;VARD:=吸筹A>VAR4;差:=吸筹A-VAR4,COLORYELLOW,NODRAW;JX:=(MA(C,10)*30+MA(C,30)*10+MA(C,60)*5+MA(C,120)*3)/(3+5+10+30);JXMA:=MA(JX,10);VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;VAR400:=EMA(VAR300,5);操盘:=3*VAR300-2*VAR400;A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR11:=EMA(VARF,30);VAR12:=CLOSE-REF(CLOSE,1);VAR13:=MAX(VAR12,0);VAR14:=ABS(VAR12);VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;VAR17:=BARSCOUNT(CLOSE);VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;VAR61:=(HIGH+LOW)/2;VAR81:=LLV(LOW,35);VARB01:=HHV(HIGH,35);BB:=EMA((VAR61-VAR81)/(VARB01-VAR81)*100,9);金宝盆:=EMA(0.667*REF(BB,1)+0.333*BB,2),LINETHICK0;GC3:=LLV(BB,198);GC4:=HHV(BB,188);CC0:=(BB-金宝盆<0.3)AND (BB<25)AND (HIGH+LOW)/2<MA((HIGH+LOW)/2,13)*0.98 AND (HIGH+LOW)/2>REF((HIGH+LOW)/2,1);DD:=FILTER(CC0,10);GG:=(BB-金宝盆<0.6)AND (BB<30)AND (HIGH+LOW)/2<MA(C,13)*0.996 AND (HIGH+LOW)/2>REF((HIGH+LOW)/2,1);HH:=FILTER(GG,10);EE:=(BB-金宝盆>0.55)AND (BB>70) AND (HIGH+LOW)/2>MA((HIGH+LOW)/2,13)*0.96 AND (HIGH+LOW)/2<REF((HIGH+LOW)/2,1);FF:=FILTER(EE,10);DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA1:=EMA(DIFF1,9);买:=CROSS(DIFF1,DEA1),NODRAW;DFQS:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);TX:=78.89;VAR301:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势:=EMA(VAR301,3)-10,COLORFF0000;A13:=CROSS(趋势,0);OK:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORWHITE;RSI2:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORWHITE;鱼:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORRED,DOTLINE;RSI4:=SMA(鱼,7,1),LINETHICK1,COLORWHITE;趋势A:=MA(((CLOSE-LLV(LOW,48))/(HHV(HIGH,48)-LLV(LOW,48))*50),17)+9,COLORFFFFFF;趋势B:=MA(((CLOSE-LLV(LOW,53))/(HHV(HIGH,53)-LLV(LOW,53))*50),17)+9,COLOR3377DD;AZ1:=MA(趋势A,7)*1.372,COLORGREEN,LINETHICK1;AZ2:=AZ1*1.0887;AZ3:=(1.5*(趋势B+RSI4)-(AZ2+AZ1))+12,COLORGREEN,LINETHICK1,DOTLINE;鱼网:=IF((CROSS(RSI2,RSI4) OR CROSS(RSI2,AZ3) AND AZ3<38 AND RSI1<51),18,0),COLORYELLOW,LINETHICK2;买入:=IF(EXIST(鱼网=18,8)AND 鱼>45 AND 鱼>REF( 鱼,2),1,0),COLORMAGENTA,,LINETHICK3;A11:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5);A14:=EMA(A11,5);A15:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);基础:=(DIFF<-0.1 AND DIFF>DEA);中线买入:=(CROSS(A11,A14)AND (A15-A14)>40 AND 基础 OR 买入)AND VR4>=VR5 ;买多: ( (XPLS OR 中线买入 OR 大底 OR A1 OR 买入 OR 买 OR A13) OR VR4>=VR5),NODRAW,COLORRED;DRAWTEXT_FIX( ISLASTBAR AND 买多 ,0.55,0.0,0,'买多'),COLORRED;买空: ( (FILTER(GC4>REF(GC4,1),10) OR DD OR FILTER(CROSS(TX,DFQS),10)) OR VR4<VR5),NODRAW,COLORCYAN;DRAWTEXT_FIX( ISLASTBAR AND 买空 ,0.55,0.0,0,'买空'),COLORCYAN;
ZLCM:=EMA(WINNER(CLOSE)*70,3);SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);ZSHTL:=SHCM/(ZLCM+SHCM)*100;ZZLKP:=ZLCM/(ZLCM+SHCM)*100;ZCMZL:=MA(ZLCM+SHCM,13);ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);ZSHJJ:=EMA(ZSHTL,89);ZZLJJ:=EMA(ZZLKP,89);DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);RSVB:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;KK1:=SMA(RSVB,10,1);D1:=SMA(KK1,5,1);KK:=INTPART(KK1);DDB:=INTPART(D1);TFXXS:=KK+DDB;T1:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=1);T2:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=0);T3:=CONST( ZCMZL=REF(ZCMZL,1));T4:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=1);T5:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=0);T6:=CONST(TFXXS<=50 );T7:=CONST(TFXXS>=160 );T8:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS<=100 );T9:=CONST( TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS>100);T10:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS>100 );T11:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS<=100 );T12:=CONST( ZSHTL>90 );T13:=CONST( ZZLKP>75 );T14:=CONST(CROSS(ZCMZL,ZZLJJ) AND ZZLKP>ZZLJJ AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T15:=CONST(CROSS(ZCMZL,ZZLKP) AND ZZLKP>ZZLJJ AND ZZLKP<ZSHTL AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T16:=CONST( CROSS(ZCMZL,ZSHTL) AND ZSHTL>ZZLKP AND ZCMZL>REF(ZCMZL,1));T17:=CONST( CROSS(ZCMZL,100) AND ZCMZL>REF(ZCMZL,1));T18:=CONST(REF(ZSHTL,1)>90 AND ZSHTL<90 );TS1:=IF(T1=1,0+0.03,0);TS2:=IF(T2=1,TS1+0.03,TS1);TS3:=IF(T3=1,TS2+0.03,TS2);TS4:=IF(T4=1,TS3+0.03,TS3);TS5:=IF(T5=1,TS4+0.03,TS4);TS6:=IF(T6=1,0+0.73,0);TS7:=IF(T7=1,TS6+0.03,TS6);TS8:=IF(T8=1,TS7+0.03,TS7);TS9:=IF(T9=1,TS8+0.03,TS8);TS10:=IF(T10=1,TS9+0.03,TS9);TS11:=IF(T11=1,TS10+0.03,TS10);TS12:=IF(T12,0+0.03,0);TS13:=IF(T13=1,TS12+0.03,TS12);TS14:=IF(T14=1,TS13+0.03,TS13);TS15:=IF(T15=1,TS14+0.03,TS14);TS16:=IF(T16=1,TS15+0.03,TS15);TS17:=IF(T17=1,TS16+0.03,TS16);TS18:=IF(T8=1,TS17+0.03,TS17);DRAWTEXT_FIX(T1 ,0.7,0,0,'监控:主力增仓'),COLOR8080FF;DRAWTEXT_FIX(T2 ,0.7,0,0,'监控:主力减仓'),COLORFFFF00;DRAWTEXT_FIX(T3 ,0.7,0,0,'监控:多空平衡'),COLORGRAY;DRAWTEXT_FIX(T4 ,0.7,0,0,'监控:主力回补'),COLORFF9933;DRAWTEXT_FIX(T5 ,0.7,0,0,'监控:主力出逃'),COLORFFFF00;DRAWTEXT_FIX(T6 ,1,0,0,'操作:买入风险'),COLORYELLOW;DRAWTEXT_FIX(T7 ,1,0,0,'操作:卖出风险'),COLORFFFF00;DRAWTEXT_FIX(T8 ,1,0,0,'操作:追涨博弈'),COLOR8080FF;DRAWTEXT_FIX(T9 ,1,0,0,'操作:稳健持股'),COLOR8080FF;DRAWTEXT_FIX(T10 ,1,0,0,'操作:盘跌减仓'),COLORFFFF00;DRAWTEXT_FIX(T11 ,1,0,0,'操作:杀跌空仓'),COLORFFFF00;DRAWTEXT_FIX(T12,0.4,0,0,'提示:筑底散兵坑 '),COLOR66FFCC;DRAWTEXT_FIX(T13,0.4,0,0,'提示:铸顶风险区'),COLORFFFF00;DRAWTEXT_FIX(T14,0.4,0,0,'提示:穿越主力 '),COLOR8080FF;DRAWTEXT_FIX(T15,0.4,0,0,'提示:穿越主力 '),COLORYELLOW;DRAWTEXT_FIX(T16,0.4,0,0,'提示:穿越散户 '),COLORGREEN;DRAWTEXT_FIX(T17,0.4,0,0,'提示:全盘穿越 '),COLOR3399FF;DRAWTEXT_FIX(T18,0.4,0,0,'提示:神秘黑洞 '),COLOR9966FF;
{DRAWTEXT_FIX(1,1,1,1,'~☆老徐☆~'),COLORYELLOW;}PJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-PJ);V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,PJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);V6:=(V1*V5)+(V2*V5);V7:=(V3*V5)+(V4*V5);WP1:=DYNAINFO(23);NP1:=DYNAINFO(22);WP2:=IF(ISLASTBAR,V7*240/FROMOPEN,V7);NP2:=IF(ISLASTBAR,V6*240/FROMOPEN,V6);主买:IF(ISLASTBAR AND PERIOD=5,WP1,WP2),COLORRED,NODRAW;主卖:IF(ISLASTBAR AND PERIOD=5,NP1,NP2),COLORGREEN,NODRAW;净量:=ABS(主买-主卖);DRAWRECTREL(0,10,CONST(主买*300/(主买+主卖)),50,RGB(230,65,0));DRAWRECTREL(0,60,CONST(主卖*300/(主买+主卖)),100,RGB(0,104,0));
N11:=2,200,13;UR00:=2,200,6;LR0:=2,200,6;TC01:=IF(H=HHV(H,8*UR00),H,DRAWNULL);TC02:=CONST(BARSLAST(TC01=H))+1;UPPER:=CONST(IF(TC02=1,H,REF(H,TC02-1)));BC1:=IF(L=LLV(L,8*LR0),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}HP:=CURRBARSCOUNT<=TC02 AND H=UPPER;{高点定位}{STICKLINE(IF(BC2>TC02,HP,LP),LOWER,UPPER,0,0),COLORWHITE;STICKLINE(IF(BC2>TC02,LP,HP),LOWER,UPPER,0,0),COLORWHITE;}NOD:=(IF(TC02>BC2,TC02,BC2)-IF(TC02>BC2,BC2,TC02));{用时}LR1:=FORCAST(C,NOD+1);NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC02),CONST(IF(MIN(TC02,BC2)=1,LR1,REF(LR1,MIN(TC02,BC2)-1))),DRAWNULL),POINTDOT,COLORRED;{近点}LR2:=SLOPE(C,NOD+1);LR3:=CONST(IF(MIN(TC02,BC2)=1,LR2,REF(LR2,MIN(TC02,BC2)-1)));FP:=NP-LR3*(NOD),POINTDOT,COLORYELLOW;{远点}EQU:=(NP+FP)/2,POINTDOT,COLORWHITE;AD:=ABS(NP-FP);{高差};DBL:=BARSLAST(BC1!=DRAWNULL)+1;DBH:=BARSLAST(TC01!=DRAWNULL)+1;BSP:=IF(BC2>TC02,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC02) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC02));AT3:=CONST(BARSLAST(AT1-LRL=AT2));AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));ATL:=LRL+AT5;UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC02) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC02));UT3:=CONST(BARSLAST(LRL-UT1=UT2));UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC02)-10,ATL,CONST(REF(ATL,MIN(BC2,TC02)-11)));{限制高}RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC02)-10,UTL,CONST(REF(UTL,MIN(BC2,TC02)-11)));{限制低}中轨:=IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLORBBBBBB;上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLORLIGRAY;下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLORLIGRAY;