开仓条件:
前一根CROSS 5MA+本周期H>REF(H,1)
平仓条件:
1。10个单位 止损
2。下破5MA 平仓()
3。收盘 CLOSE平仓
ma5:=ma(c,5);
if ref(cross(c,ma5),1) and h>ref(h,1) then buy(holding=0,1,market);
//止损
if enterprice-c>=10*mindiff then sell(holding>0,0,limitr,c);
if cross(ma5,c) then sell(holding>0,0,limitr,c);
if time>145500 and time<=150000 then sell(holding>0,0,limitr,c);
TKS
如果在逐K模式下怎么完成测试 我不想用CLOSE
收盘平仓的维持