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)
波峰: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;
买进条件:=crOSS(C,买进价) AND 买进价>REF(买进价,1);
白买进: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);
黄加码:IF(加码条件,L,H),coloryellow,POINTDOT;
STICKLINE(加码条件,H,L,0,1),coloryellow,linethick2;
STICKLINE(加码条件,O,C,4,1),coloryellow,linethick2;
fa:=BARSLAST(CROSS(ma18,ma6)) AND CROSS(ma6,ma18);
STICKLINE(fa,ma6,ma6-0.09,4,0),colorwhite;
DRAWTEXT(fa,ma6-0.13,'★'),color0000ff;