if c-enterprice>=5 then sell(holding>0,1,market);//多赢 if enterprice-c>=5 then sellshort(holding<0,1,market);//空赢
再添加什么语句,止盈不要走完一根K线,信号一产生就止盈平仓
2楼
pyd 发表于:2016/3/9 12:29:28
这个是软件里边选择的不是代码决定的
交易-》图表程序化交易-》勾选固定时间间隔
此主题相关图片如下:1.png
3楼
wenarm 发表于:2016/3/9 12:32:52
你如果是走完K。可以在交易---下单设置中止损止盈这个界面设置。
4楼
lin451053673 发表于:2016/3/9 21:28:29
我是想止损走完k,止盈不走完,马上成交
5楼
lin451053673 发表于:2016/3/9 21:39:43
ma5:ma(c,5); ma10:ma(c,10); jc:cross(ma5,ma10); sc:cross(ma10,ma5); if jc then begin sellshort(holding<0,1,market); buy( holding=0,1,market); end if sc then begin sell(holding>0,1,market); buyshort( holding=0,1,market); end if c-enterprice>=5 then sell(holding>0,1,market);//多赢 if enterprice-c>=5 then sellshort(holding<0,1,market);//空赢