郑商所不支持市价下单。那自动化交易系统该怎样改一下。
MA1:MA(CLOSE,生命线),NODRAW;kd:cross(c,生命线)&&cross(c,趋势线) or 生命线<趋势线 and cross(c,趋势线) ;
kk:cross(生命线,c)&&cross(趋势线,C) or 生命线>趋势线 and cross(趋势线,c) ;
pk:cross(c,趋势线);
pd:cross(趋势线,C) ;
sellshort(holding<0 and pk,holding,market);
buy(holding=0 and kd,1,market);
sell(holding>0 and pd,holding,market);
buyshort(holding=0 and kk,1,market);

此主题相关图片如下:qq截图20150525234006.jpg
MA1:MA(CLOSE,生命线),NODRAW;kd:cross(c,生命线)&&cross(c,趋势线) or 生命线<趋势线 and cross(c,趋势线) ;
kk:cross(生命线,c)&&cross(趋势线,C) or 生命线>趋势线 and cross(趋势线,c) ;
平多条件:(持仓以来的最高价-收盘价)大于10个最小变动单位,多单止盈;收盘价-持仓均价>8个最小变动单位,多单止损。
平空条件:(持仓以来的最低价-收盘价)大于10个最小变动单位,空单止盈;收盘价-持仓均价>8个最小变动单位,空单止损。
请老师帮忙编写一下代码。
这种情况应该怎样修改?

此主题相关图片如下:qq截图20150526172607.jpg
平仓条件里加上enterbars>0就不会在开仓当根平仓了
hh:hhv(h,enterbars+1);
ll:llv(l,enterbars+1);
if hh-c>=10*mindiff and enterbars>0 then sell(holding>0,holding,market);
if c-AVGENTERPRICE>8*mindiff and enterbars>0 then sell(holding>0,holding,market);
if c-ll>10*mindiff and enterbars>0 then sellshort(holding<0,holding,market);
if c-AVGENTERPRICE>8*mindiff and enterbars>0 then sellshort(holding<0,holding,market);