Rss & SiteMap

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

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

标题:加仓,

1楼
风中 发表于:2015/12/24 11:35:59
当出现开多持多后,在开多的区间内出现收盘为阴线的时候,收盘价加一手多,当信号出现平多开空时,全部多单都平了
当出现开空持空后,在开空的区间内出现收盘为阳线的时候,收盘价加一手空,当信号出现平空开多时,全部空单都平了
2楼
jinzhe 发表于:2015/12/24 13:12:43

if holding>0 and isdown then buy(1,1,limitr,close);

if holding<0 and isup then buyshort(1,1,limitr,close);

 

if 平多开空 then begin

   sell(1,0,market);

   开空语句;

end

 

if 平空开多 then begin

   sellshort(1,0,market);

   开多语句;

end

3楼
风中 发表于:2015/12/24 13:39:05
 图表交易图片点击可在新窗口打开查看
4楼
风中 发表于:2015/12/24 13:42:45
开仓条件里面有cross不能成立?

5楼
jinzhe 发表于:2015/12/24 13:46:22

是的 if 里面不能有cross。比如:if cross(a,b) 这样的是可以的

 

但是

if cross(c,d) then begin

   if cross(a,b) then cc:=ss;

end

这里面的第二个cross:cross(a,b) 则是不可以的,

 

所以对应的办法是写在外面,比如:

cond:=cross(a,b);

if cross(c,d) then begin

    if cond then cc:=ss;

end

这样就可以了

 

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


Powered By Dvbbs Version 8.3.0
Processed in 0.00781 s, 3 queries.