M1:=5;M2:=10;M3:=20;M4:=60;MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;VAR6:=(VAR3+VAR4+VAR5)/3;VAR7:=EMA(VAR6,5);ZB:=EMA(EMA(VAR3,5),5)*3, COLORSTICK;VAR8:=IF(VAR6<=-20,10,0);VAR9:=HHV(VAR8,10);VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);K:=EMA(VAR7,5)*2, , COLORFF00FF;D:=EMA(K,5), , COLORWHITE;J:=K*3-D*2, ,COLORYELLOW;VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;HS:=VOL/CAPITAL*100, , COLORGREEN;DRAWTEXT(VAR8=10 AND FILTER(VAR8=10,5),LOW*0.98,'底') COLORMAGENTA;DRAWTEXT(VARA=20,LOW*0.99,'抄') COLORYELLOW;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;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);DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'底部'),LINETHICK1,COLORFF00FF;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)=1,LOW*0.95,'底'), COLORWHITE;
LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;DRAWTEXT(CROSS(84,RSI) , HIGH,'顶'),COLORGREEN;VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)< 1.01) AND (VAR3AA>0),91,0);VAR51:=3;VAR52:=(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));DRAWTEXT(CROSS(VAR52,VAR51), LOW,'底部2') COLORMAGENTA;STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR ,0.06,0.01,1,DYBLOCK),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR ,0.065,0.01,0,HYBLOCK),COLORYELLOW;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DEA,DIFF),1));A2:=BARSLAST(REF(CROSS(DIFF,DEA),1));VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;HONGJU:=IF(VAR1>0,VAR1,0);GAOPAO:=CROSS(DIFF,DEA) AND HONGJU>=40;DRAWICON(GAOPAO,HIGH*1.01,6);DRAWTEXT(GAOPAO,HIGH*1.02,'顶部'),COLORGREEN;LLVV:=LLV(LOW,5);DIXI:=CROSS(DEA,DIFF) AND REF(DEA,A1+1)>0 AND DEA< 0;工作线:=EMA(CLOSE,17),COLORYELLOW;生命线:=MA(CLOSE,56),COLORRED;M0:=MA(CLOSE,5);M10:=MA(CLOSE,12);M30:=MA(CLOSE,30);M41:=MA(CLOSE,41);TJ2:=MA(CLOSE,3)< M2;VAR2:=(CLOSE*2+HIGH+LOW)/4;SK:=EMA(VAR2,13)-EMA(VAR2,73);SD:=EMA(SK,2);短线:=CROSS(SK,SD) AND SK< 0.05 AND (VOL/MA(VOL,5)>2 OR CLOSE/REF(CLOSE,1)>0.035 AND CLOSE>EMA(CLOSE,17));CY:=BARSLAST(短线);MACD双底:=REF(LOW,A2+1)< CLOSE AND CROSS(DIFF,DEA);介入:=COUNT(短线,4)=1 AND COUNT(MACD双底,1)=1 AND CLOSE/MA(CLOSE,56)*1000>980 AND CLOSE>OPEN AND VOL>=MA(VOL,5) AND DIFF>=-0.1;{DRAWTEXT(介入,LOW*0.982,),COLORRED;}DRAWICON(介入,LOW*0.982,1);反向顶背:=REF(CLOSE,A2+1)>CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);逃顶:=CROSS(SD,SK) AND SK>0.2 AND VOL/MA(VOL,5)< 2;逃顶成立:=COUNT(逃顶,4)=1 AND COUNT(反向顶背,1)=1;DRAWICON(逃顶成立,HIGH*1.01,15);{DRAWTEXT(逃顶成立,HIGH*1.01,25),COLORGREEN;}N1G:=CLOSE/REF(CLOSE,1)>=1.097 AND HIGH=CLOSE AND NOT(OPEN=HIGH);A1G:=BARSLAST(N1G);A2G:=LLV(LOW,A1G-1)>REF(LOW,A1G) AND CLOSE/REF(OPEN,A1G)>1 AND CLOSE/REF(OPEN,A1G)<=1.04;XGGG:=FILTER(A2G,3) AND A1G>=4 AND A1G<=20;DRAWICON(XGGG,LOW*0.96,41);{DRAWTEXT(XGGG,LOW*0.96,26),COLORRED;};