老师:请帮忙写个代码 连续2根阳线,第3根open 开多,盈利10跳 平多(开仓当根,若满足盈利就当根平仓);若开仓后low<第一根阳线的LOW,则止损。 |
if ref(all(c>o,2),1) and holding=0 then buy(1,1,marketr);
if close-enterprice>10*mindiff and holding>0 then sell(1,holding,marketr);
if low<ref(low,enterbars+1) and holding>0 then sell(1,1,marketr);