{参数
P1: 0 300 5
P2: 0 300 10
P3: 0 300 20
P4: 0 300 35
P5: 0 300 60
}
MA1:MA(CLOSE,P1);
MA2:MA(CLOSE,P2);
MA3:MA(CLOSE,P3),COLORRED;
MA4:MA(CLOSE,P4);
MA5:MA(CLOSE,P5);
DRAWTEXT(CROSS(MA1,MA3),MA3,'●买'),COLORYELLOW;
DRAWTEXT(CROSS(MA3, MA1), MA1,'●卖'),COLORGREEN;
DRAWTEXT(CROSS(MA1,MA4),MA4,'★买'),COLORMAGENTA;
DRAWTEXT(CROSS(MA4, MA1), MA1,'★卖'),COLORBLUE;
x:=BARPOS-hhv(if(DISPSTATUS=1,BARPOS,0),0)+1;
hh:=hhv(h,x); ll:=llv(l,x); hl:=hh-ll;
a80:=.809*hl+ll;a61:=.618*hl+ll;a38:=.382*hl+ll;
a19:=.191*hl+ll; a5:=.5*hl+ll;
DRAWTEXTREL(0,0,'最高 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄' ),COLORYELLOW;
DRAWTEXTREL(0,900+76,'最低.................................................................................................................................'),color00ff00;
DRAWTEXTREL(0,0.50*(900+76),'0.5..................................................................................................................................'),color0099ff;
DRAWTEXTREL(0,0.191*(900+76),'0.809................................................................................................................................'),colorred;
DRAWTEXTREL(0,0.382*(900+76),'0.618................................................................................................................................'),colorred;
DRAWTEXTREL(0,0.618*(900+76),'0.382................................................................................................................................'),colorred;
DRAWTEXTREL(0,0.809*(900+76),'0.191................................................................................................................................'),colorred;
DRAWTEXTREL(999,0.809*(900+76),'19.1%:'+NUMTOSTR(a19)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.618*(900+76),'38.2%:'+NUMTOSTR(a38)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.5*(900+76),'50%:'+NUMTOSTR(a5)),VALIGN2,ALIGN2,color0099ff;
DRAWTEXTREL(999,0.382*(900+76),'61.8%:'+NUMTOSTR(a61)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.191*(900+76),'80.9%:'+NUMTOSTR(a80)),VALIGN2,ALIGN2,colorwhite;
操作线:MA(CLOSE,5),Linethick2,CoLor0000FF;
VARA:=IF((CLOSE>150),91.3,0.913);
【下沿】:=(INTPART((CLOSE)/(VARA)))*(VARA);
【上沿】:=【下沿】+VARA;
【中线】:=(【下沿】+【上沿】)/(2);
STICKLINE(FILTER((【下沿】>0) AND ((CLOSE>【下沿】)>0) AND (CLOSE<【中线】),10),【下沿】,【下沿】,50,0),Linethick1,CoLorFF9900;
STICKLINE(FILTER((【上沿】>0) AND (CLOSE<【上沿】) AND (CLOSE>【中线】),10),【上沿】,【上沿】,50,0),Linethick1,CoLorFF99FF;
STICKLINE(FILTER((【中线】>0),5),【中线】,【中线】,50,0),Linethick1,CoLorFFFFFF;
DRAWTEXT(FILTER((【下沿】>0) AND (CLOSE>【下沿】) AND (CLOSE<【中线】),10),【下沿】,'支'),CoLor00FFFF;
DRAWTEXT(FILTER((【下沿】>0) AND (CLOSE>【下沿】) AND (CLOSE<【中线】),10),【中线】,'压'),CoLorFFFF00;
DRAWTEXT(FILTER((【上沿】>0) AND (CLOSE<【上沿】) AND (CLOSE>【中线】),10),【上沿】,'压'),CoLorFFFF00;
DRAWTEXT(FILTER((【上沿】>0) AND (CLOSE<【上沿】) AND (CLOSE>【中线】),10),【中线】,'支'),CoLor00FFFF;