请帮忙看看这个怎么写。谢谢!!
当ma100穿越ma5 (死叉)时,求ma5穿越ma100(金叉)到ma100穿越ma5 (死叉) 之间的最高价,和最高价出现时的BARPOS。
然后将最高价和最高价的BARPOS,分别存入两个全局变量中。
nn2:=barslast(cross(ma100,ma5));
hh1:=hhv(h,nn2+1);
if cross(ma5,ma100) then hh:=hh1;
pp:valuewhen(h=hh,barpos);
hh是最高价,pp是barpos