請幫忙看看這個怎么寫。謝謝!!
當(dāng)ma100穿越ma5 (死叉)時,求ma5穿越ma100(金叉)到ma100穿越ma5 (死叉) 之間的最高價,和最高價出現(xiàn)時的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