if min(valuewhen(enterbars=0,l),llv(l,5))<l then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if max(valuewhen(enterbars=0,h),hhv(h,5))>h then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
这个是在日线上的,如果要在其他周期上使用 那么把hhv(h,5) 和llv(l,5)中的5改成对应的1天k线总数
楼上笔误
if min(valuewhen(enterbars=0,l),llv(l,5))>l then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if max(valuewhen(enterbars=0,h),hhv(h,5))<h then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end