Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共11 条记录, 每页显示 10 条, 页签: [1] [2]
[浏览完整版]

标题:实盘账户有信号,没有持仓?

1楼
jiliang1007 发表于:2015/5/21 21:34:28
自动化交易委托价格为0,怎样设置成市价下单
2楼
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);
3楼
王锋 发表于:2015/5/21 21:47:45

委托价格为0就是市价了

4楼
jiliang1007 发表于:2015/5/25 23:40:40
白色箭头应该是平空开多信号,怎么修改?
5楼
jiliang1007 发表于:2015/5/25 23:41:48

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20150525234006.jpg
图片点击可在新窗口打开查看
6楼
pyd 发表于:2015/5/26 8:42:12

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

 

7楼
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个最小变动单位,空单止损。
请老师帮忙编写一下代码。


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);
9楼
jiliang1007 发表于:2015/5/26 17:26:06
这种情况应该怎样修改?
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20150526172607.jpg
图片点击可在新窗口打开查看
10楼
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);

共11 条记录, 每页显示 10 条, 页签: [1] [2]


Powered By Dvbbs Version 8.3.0
Processed in 0.03027 s, 2 queries.