ma6:ma(c,6),colorwhite,linethick2;
ma18:ma(c,18),color0099ff,linethick2;
ma55:ma(c,55),colorff00FF;
ma125:ma(c,125),colorffcc66;
ma250:ma(c,250),colorblue;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BacKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BArslAST(HD)); B:=REF(C,BARSLAST(LD));
t1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
t2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波峰:IF(t1,A,A),ColorFF00FF,POINTDOT;
STICKLINE(t1,A,A,9,0),ColorFF00FF;
波谷:IF(t2,B,B),Color80FF00,POINTDOT;
STICKLINE(t2,B,B,9,0),Color80FF00;
买进价:=((c-ref(ma6,1))/6+ma6)*1.004;
DRAWTEXTAbs(5,5,' '),linethick1,COLOR00EEff;
买进条件:=cross(c,买进价) and 买进价>ref(买进价,1);
白K买进:IF(买进条件,l,h),COLORWHITE,POINTDOT;
STICKLINE(买进条件,h,l,0,1),colorwhite,linethick2;
STICKLINE(买进条件,o,c,4,1),colorwhite,linethick2;
加码价:=((c-ref(ma18,1))/18+ma18)*1.004;
加码条件:=cross(c,加码价) and 加码价>ref(加码价,1);
黄K加码:IF(加码条件,l,h),coloryellow,POINTDOT;
STICKLINE(加码条件,h,l,0,1),coloryellow,linethick2;
STICKLINE(加码条件,o,c,4,1),coloryellow,linethick2;