XA1:=DATE<=20241028;
工作线:=(MA(CLOSE,5))*XA1,COLORWHITE,LINETHICK1;
操作线:=(MA(CLOSE,10))*XA1,COLORRED,LINETHICK1;
支撑1:=(MA(CLOSE,21))*XA1,COLORBLUE,LINETHICK1;
支撑2:=(MA(CLOSE,30))*XA1,COLORYELLOW,LINETHICK1;
牛熊线:(MA(CLOSE,60))*XA1,COLORBLUE,LINETHICK2;
买线:=(CROSS(3,10))*XA1;
卖线:=(MA(买线,2))*XA1;
BU:=(CROSS(买线,卖线))*XA1;
SEL:=(CROSS(卖线,买线))*XA1;
DRAWTEXT(BU,L*0.99,'←建仓')*XA1,LINETHICK2,COLOR00FFFF;
DRAWTEXT(SEL,H*1.0,'←清仓')*XA1,LINETHICK1,COLOR00FF00;
VARE:=(MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20)*XA1;
VARF:=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);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=(VARF<REF(VAR10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1))*XA1;
DRAWTEXT(VAR11*XA1 AND COUNT(VAR11*XA1,30)=1,L*0.99,'←进场')*XA1,LINETHICK1,COLORYELLOW;
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0);
VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IF(VAR18<90,VAR18,100);
VAR1A:=IF(VARE>0,VARE,0);
VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
DRAWTEXT(VAR1C AND COUNT(VAR1C,30)*XA1=1*XA1,H*1,'游资异动')*XA1,LINETHICK2,COLORWHITE;
WVARE:=REF(LOW,1)*0.9;
WVARF:=LOW*0.9;
WVAR12:=CLOSE-REF(CLOSE,1);
WVAR13:=MAX(WVAR12,0);
WVAR14:=ABS(WVAR12);
WVAR15:=SMA(WVAR13,7,1)/SMA(WVAR14,7,1)*100;
WVAR16:=SMA(WVAR13,13,1)/SMA(WVAR14,13,1)*100;
WVAR17:=BARSCOUNT(CLOSE);
WVAR18:=SMA(MAX(WVAR12,0),6,1)/SMA(ABS(WVAR12),6,1)*100;
WVAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
WVAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
WVAR1B:=SMA((SMA(WVAR1A,4,1)-50)*2,3,1);
WVAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
WVAR1D:=SMA(WVAR1C,4,1);
VAR1E:=SMA(WVAR1D,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;
VAR21:=(HIGH+LOW+CLOSE)/3;
VAR22:=(VAR21-MA(VAR21,14))/(0.015*AVEDEV(VAR21,14));
VAR23:=(VAR21-MA(VAR21,70))/(0.015*AVEDEV(VAR21,70));
VAR24:=IF(VAR22>=150 AND VAR22<200 AND VAR23>=150 AND VAR23<200,10,0);
VAR25:=IF(VAR22<=-150 AND VAR22>-200 AND VAR23<=-150 AND VAR23>-200,-10,VAR24);
DRAWTEXT(VAR20 AND COUNT(VAR20,1)=1*XA1,H*0.99,'进!')*XA1 , COLORMAGENTA;
DRAWTEXT(VAR24 AND COUNT(VAR24,1)=1*XA1,L*1.1,'出!')*XA1 , COLOR00FF00;
趋势线:MA(C,20)*XA1,LINETHICK2,COLORRED;
短线操作线:MA(C,3)*XA1,COLORWHITE;
IF(趋势线>REF(趋势线,1)*XA1,趋势线*XA1,DRAWNULL),LINETHICK2,COLORRED;
IF(趋势线<=REF(趋势线,1)*XA1,趋势线*XA1,DRAWNULL),LINETHICK2,COLORGREEN;
STICKLINE(C/REF(C,1)>=1.095 AND C=H,O,C,2.8,0),COLORMAGENTA;
强势线:MA(LOW,20)*XA1*1.1,,COLORRED,DOTLINE,LINETHICK2;
弱势线:MA(HIGH,20)*XA1*0.9,COLORYELLOW,DOTLINE,LINETHICK2;
X_1:=LLV(HIGH,500);
做多能量:=100*(CLOSE-X_1)*XA1/X_1,COLORRED,LINETHICK2;
X_2:=HHV(HIGH,240)*XA1;
做空能量:=100*(X_2-CLOSE)*XA1/CLOSE,COLORGREEN,LINETHICK2;
能量饱和度:=100*WINNER(CLOSE)*XA1,COLORYELLOW,LINETHICK2;
主力拉升:=MA(VOL,3)*XA1/VOL*((CLOSE-REF(CLOSE,1))*XA1/REF(CLOSE,1))*1000,NODRAW;
DRAWTEXT(做空能量<=3*XA1,L*0.98,'B')*XA1,COLORRED,LINETHICK2;
多头:=趋势线>REF(趋势线,1)*XA1;
走好:=多头=1 AND REF(多头,1)*XA1<>1;
A:=能量饱和度>=95*XA1 AND COUNT(能量饱和度>=95,BARSLAST(走好)+1)=1*XA1;
B:=做空能量<=3*XA1 AND COUNT(做空能量<=3,BARSLAST(走好)+1)=1*XA1;
多头主升:=A OR B;
DRAWTEXT(多头主升*XA1,L*0.95,'牛抬头')*XA1,COLORRED;
AA:=能量饱和度>=95 OR 做空能量<=3;
主升浪突破:=AA*XA1 AND CROSS(C,强势线)*XA1;
DRAWTEXT(主升浪突破*XA1,L*0.95,'神牛')*XA1,COLORYELLOW;
主升浪强势:=AA AND COUNT(AA*XA1,BARSLAST(CROSS(做多能量,100)*XA1)+1)=1;
DRAWTEXT(主升浪强势*XA1,L*0.9,'强牛')*XA1,COLORMAGENTA;
DRAWTEXT(CROSS(88,RSI)*XA1,(HIGH * 0.98),'出')*XA1,COLORGREEN;