请教老师,在1分钟周期内怎么写下面的开仓条件:
在盘中1分钟K线创日内新高时做多,创日内新低时做空,同时前日的收盘价止损。
if h=hhv(h,todaybar) then buy(holding=0,1,marketr);
if l=llv(l,todaybar) then buyshort(holding=0,1,marketr);
if enterprice<ref(c,todaybar) then sell(1,0,marketr);
if enterprice>ref(c,todaybar) then sellshort(1,0,marketr);