编写条件:
编写方法:
网友求助:
解答如下:
hc:=if(date>=1080407 and date<=1091107,c,0);
lc:=if(date>=1080407 and date<=1091107,c,9999);
收盘最高价:=hhv(hc,0);收盘最低价:=llv(lc,0);
t1:=barslast(hc>0 and ref(hc,1)=0);t2:=barslast(hc=0and ref(hc,1)>0);
tt:=t1-t2;
平均收盘价:sum(hc,0)/tt;
波幅:((收盘最高价-收盘最低价)/平均收盘价)*100
lc:=if(date>=1080407 and date<=1091107,c,9999);
收盘最高价:=hhv(hc,0);收盘最低价:=llv(lc,0);
t1:=barslast(hc>0 and ref(hc,1)=0);t2:=barslast(hc=0and ref(hc,1)>0);
tt:=t1-t2;
平均收盘价:sum(hc,0)/tt;
波幅:((收盘最高价-收盘最低价)/平均收盘价)*100