B:ZIG(3,10)*100,COLORFF00FF;
G:MA(B,2),COLORFFFF00;
DRAWGBK(B>G,STRIP(RGB(100,10,0),RGB(100,10,0),3)),COLOR600020;
DRAWGBK(B<G,STRIP(RGB(40,80,255),RGB(120,130,255),3)),COLOR404050;
N:=9;M1:=3;M2:=3;
短线:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,colorred,LINETHICK2;
中线:=SMA(短线,M1,1),colormagenta;
空线:=SMA(中线,M2,1),colorligreen;
BB:=IF(BARSLAST(CROSS(中线,短线))>=3 AND CROSS(短线,中线) AND 中线<30,20,0);
买:=IF(BB,-20,-40),colorred;
DRAWICON(BB>0 AND B>G,L,"BUY");
AA:=IF(BARSLAST(CROSS(短线,中线))>=4 AND CROSS(中线,短线) AND 短线>50,20,0);
//STICKLINE(AA AND B<G ,L*0.98,H,1,0),coloryellow,LINETHICK2;
DRAWICON(AA AND B<G,H*1.02,"yang");
S线:PEAK(1,5,1),coloryellow,LINETHICK2;
B线:TROUGH(3,5,0),colorred,LINETHICK2;
预期获利空间:(S线/B线)*100-100;
底部界入获利:(CLOSE/B线)*100-100;
开盘价:OPEN;
收盘价:CLOSE;
最高价:HIGH;
最低价:LOW;
小波峰:ZIG(3,6),colorwhite, LINETHICK1;
中波峰:ZIG(3,13),LINETHICK1;
BB:=ZIG(3,6)*100,COLORFF00FF;
GG:=MA(BB,2),COLORFFFF00;
AA:=ZIG(3,35)*100,COLORFF00FF;
DD:=MA(AA,2),COLORFFFF00;
大波峰:ZIG(3,35),LINETHICK1;
//DRAWICON(CROSS(B,G) AND B>G,B线,1);
//DRAWICON(CROSS(G,B) AND B<G,H*1.009,2);
DRAWICON(CROSS(BB,GG) AND BB>GG,L*0.998,1);
DRAWICON(CROSS(GG,BB) AND BB<GG,H*1.009,2);
DRAWTEXT(CROSS(B,G),B线*0.990,'↖B'),coloryellow,LINETHICK5;
DRAWTEXT(CROSS(G,B) AND B<G,H*1.018,'↙S'),colorgreen,LINETHICK5;