Rss & SiteMap
金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/
老师,我想写一个程序
a,b初始为0
当每日结束后,产生最高价对应的时间在time1范围内,则a:=a+1。若最低价对应的时间在time2范围内,则b:=b+1。
麻烦老师写一下。
variable:a=0,b=0;
nn1:=barslast(date<>ref(date,1));
t1:=valuewhen(hhv(h,nn1+1)=h,h);
t2:=valuewhen(llv(l,nn1+1)=l,l);
if t1>time1 and t2<time2 then a:=a+1;
if t1>time1 and t2<time2 then b:=b+1;