九毛八公式指标
公式模块:
求助,改黄金分割大智慧L2左右都显示比例及数值
源码
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,'最高 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄' ),coloraaaaaa;
DRAWTEXTREL(0,900+76,'最低.................................................................................................................................'),color00ff00;
DRAWTEXTREL(0,0.50*(900+76),'0.5..................................................................................................................................'), colorff937f;
DRAWTEXTREL(0,0.191*(900+76),'0.809................................................................................................................................'), colorff937f;
DRAWTEXTREL(0,0.382*(900+76),'0.618................................................................................................................................'), colorff937f;
DRAWTEXTREL(0,0.618*(900+76),'0.382................................................................................................................................'), colorff937f;
DRAWTEXTREL(0,0.809*(900+76),'0.191................................................................................................................................'), colorff937f;
DRAWTEXTREL(999,0.809*(900+76),'19.1%:'+NUMTOSTR(a19)),VALIGN2,ALIGN2, colorff937f;
DRAWTEXTREL(999,0.618*(900+76),'38.2%:'+NUMTOSTR(a38)),VALIGN2,ALIGN2, colorff937f;
DRAWTEXTREL(999,0.5*(900+76),'50%:'+NUMTOSTR(a5)),VALIGN2,ALIGN2, colorff937f;
DRAWTEXTREL(999,0.382*(900+76),'61.8%:'+NUMTOSTR(a61)),VALIGN2,ALIGN2, colorff937f;
DRAWTEXTREL(999,0.191*(900+76),'80.9%:'+NUMTOSTR(a80)),VALIGN2,ALIGN2, colorff937f;