open_pos=barslast(date<>ref(date,1));//只能写在if语句前
if 满足开仓条件 then pos=:open_pos;
if pos<60 输出‘10点前的开仓’
if pos>60 输出‘10点后的开仓’
.... > 120 ....
现在的问题是,只输出‘10点前的开仓’
后面的都draw不出来
干脆老大你帮我写个简单的例子吧
当发生ma5<ref(ma5,1) and ref(ma5,2)>ref(ma5,1)时卖出开仓。
开仓时间在9-10点之间,则在11:00进行平仓操作。
自己顶.
t1:valuewhen(下单条件,time);
if time=110000 and t1>=090000 and t2<=100000 then 平仓语句;