源码
ADVANCE,COLORRED,NODRAW;
DECLINE,COLORRED,NODRAW;
BTIQ:=100*ADVANCE/(ADVANCE+DECLINE);
判明大盘:=MA(BTIQ,5);
买入:=判明大盘<30,NODRAW,COLORYELLOW;
DRAWICON(买入,30*0.99,1);
25,COLORLICYAN;
80,COLORLIRED;
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
CJ_K:MA(K,15),LINETHICK3;
CJ_D:MA(D,15),LINETHICK3;
CJ_J:MA(J,15),LINETHICK3;
DRAWICON(CROSS(CJ_K,CJ_D)&&CJ_D<30,CJ_K*0.80,11);
DRAWICON(CROSS(CJ_D,CJ_K)&&CJ_D>70,CJ_K*1.05,12);
VAR1:=1;
VAR2:=((((2*CLOSE)+HIGH)+LOW) / 4);
高位:90,COLORFFFF00;
低位:20,COLORFFFF00;
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
C1:(EMA((((VAR2-VAR4)/(VAR5-VAR4))*100),4)*VAR1),COLORFF00FF;
C2:(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR1),COLORFFFFFF;
DRAWICON(CROSS(C1,C2) AND C2>0,C2,1);
DRAWICON(CROSS(C2,C1) AND C2<-100,C1,2);
DRAWICON(CROSS(C1,C2) AND C2<0,C2,1);
DRAWICON(CROSS(C2,C1) AND C2>-100,C1,2);
条件:=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(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2)) OR (REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))
OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),50,'止'),COLORGREEN;
DRAWTEXT(条件,20,'买'),COLORWHITE;
DRAWTEXT(条件0,85,'卖'),COLORYELLOW;
DRAWTEXT(CROSS(C1,75),70,'危险区'),COLORBLUE;
DRAWTEXT(TJ3,65,'安'),COLORRED;
DRAWTEXT(TJ3,56,'全'),COLORRED;
DRAWTEXT(TJ3,47,'买'),COLORRED;
DRAWTEXT(TJ4,85,'逃顶'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,88,'清仓'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,80,'减仓'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,50,'控盘'),COLORWHITE;
DRAWTEXT(ISLASTBAR,20,'吸筹'),COLORGREEN;
{MA2爆点}
VAR41:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VARK:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
VARL:=(REF(VARK,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARX:=(REF(VARL,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR30:=(REF(VARX,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR31:=(REF(VAR30,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR32:=(REF(VAR31,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR33:=(REF(VAR32,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR34:=(REF(VAR33,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR35:=(REF(VAR34,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR36:=(REF(VAR35,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR37:=(REF(VAR36,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR38:=(REF(VAR37,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR39:=REF(VARK OR VARL OR VARX OR VAR30 OR VAR31 OR VAR32 OR VAR33 OR VAR34 OR VAR35 OR VAR36 OR VAR37 OR VAR38,1) AND VAR41;
DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);{来自经典副B}
DEA:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEA)*2;
A10:=BARSLAST(REF(CROSS(DIFF,DEA),1));
A11:=BARSLAST(REF(CROSS(DEA,DIFF),1));
底背离:=REF(CLOSE,A10+1)>CLOSE AND DIFF> REF(DIFF,A10+1) AND CROSS(DIFF,DEA);
顶背离:=REF(CLOSE,A11+1)< CLOSE AND REF(DIFF,A11+1)>DIFF AND CROSS(DEA,DIFF);
{爆}
LC:=REF(C,1),NODRAW;
LC2:=REF(C,2),NODRAW;
平底:=LC<LC2&&C>=LC,NODRAW;
收阳:=C>O,NODRAW;
XG:=平底 AND 收阳 AND 底背离;
DRAWICON(XG,LOW*0.97,1);
DRAWTEXT(XG,LOW*0.97,' 爆'),COLORRED;
{绝顶}
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
顶:REFDATE(高1,DATE),COLORBLACK;
绝顶:REFDATE(顶,DATE),NODRAW;
跑:=绝顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;
STICKLINE(跑,C,O,3,0),COLOR777777;
STICKLINE(跑,C,O,2,0),COLORAAAAAA;
STICKLINE(跑,C,O,1,0),COLORCCCCCC;
STICKLINE(跑,C,O,0.1,0),COLORFFFFFF;
STICKLINE(跑,L,H,0,0),COLORFFFFFF;
DRAWTEXT(跑,C*1.06,'绝顶')COLORFFFFFF;
{顶底奇准}
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
SHORT:=7; LONG:=19;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
奇准买进无:(LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
趋势区:=IF((EVERY(DOWN>=REF(DOWN,1),1)),4,2)COLOR0000FF,LINETHICK3;
绝低买无:IF(((CROSS(趋势区,2.1))),15,0),STICK,COLORRED,LINETHICK3;
特准顶高卖无:IF(((CROSS(3.9,趋势区))),-10,0),STICK,COLORFF9150,LINETHICK3;
{是顶就跑}
BAR1:=((LLV(LOW,5) = LLV(LOW,45)) AND (CLOSE >= (OPEN * 1.04)));
BAR2:=(CLOSE > ((REF(HIGH,1) + REF(LOW,1)) / 2));
BAR3:=REF(CLOSE,1);
BAR4:=((SMA(MAX((CLOSE - BAR3),0),6,1) / SMA(ABS((CLOSE - BAR3)),6,1)) * 100);
是底买进:=(BAR1 AND BAR2),STICK,COLORYELLOW,LINETHICK2;
是顶就跑:=CROSS(80,BAR4),STICK,COLORGREEN,LINETHICK2;
STICKLINE(CROSS(80,BAR4),0,10,1,0)COLORGREEN;
STICKLINE(是底买进,0,2,1,0)COLORYELLOW;
DRAWICON(是底买进,2=10,23);
DRAWICON(是顶就跑,10,1);