以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://www.weistock.com/bbs/list.asp?boardid=2)
----  实盘账户有信号,没有持仓?  (http://www.weistock.com/bbs/dispbbs.asp?boardid=2&id=78883)

--  作者:jiliang1007
--  发布时间:2015/5/21 21:34:28
--  实盘账户有信号,没有持仓?
自动化交易委托价格为0,怎样设置成市价下单
--  作者:jiliang1007
--  发布时间:2015/5/21 21:38:38
--  
郑商所不支持市价下单。那自动化交易系统该怎样改一下。

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);

--  作者:王锋
--  发布时间:2015/5/21 21:47:45
--  

委托价格为0就是市价了


--  作者:jiliang1007
--  发布时间:2015/5/25 23:40:40
--  
白色箭头应该是平空开多信号,怎么修改?
--  作者:jiliang1007
--  发布时间:2015/5/25 23:41:48
--  

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20150525234006.jpg
图片点击可在新窗口打开查看

--  作者:pyd
--  发布时间:2015/5/26 8:42:12
--  

请看链接的问题26 http://www.weistock.com/bbs/dispbbs.asp?boardid=4&Id=332

 


--  作者:jiliang1007
--  发布时间:2015/5/26 17:12:30
--  
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个最小变动单位,空单止损。
请老师帮忙编写一下代码。



--  作者:pyd
--  发布时间:2015/5/26 17:19:30
--  
hh:hhv(h,enterbars+1);
ll:llv(l,enterbars+1);
if hh-c>=10*mindiff then sell(holding>0,holding,market);
if c-AVGENTERPRICE>8*mindiff then sell(holding>0,holding,market);
if c-ll>10*mindiff then sellshort(holding<0,holding,market);
if c-AVGENTERPRICE>8*mindiff then sellshort(holding<0,holding,market);

--  作者:jiliang1007
--  发布时间:2015/5/26 17:26:06
--  
这种情况应该怎样修改?
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20150526172607.jpg
图片点击可在新窗口打开查看

--  作者:pyd
--  发布时间:2015/5/26 17:29:10
--  

平仓条件里加上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);