Rss & SiteMap

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

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

标题:图表K线走完模式,如何用代实现提前5秒下单?

1楼
zhou1980 发表于:2014/9/19 14:09:07
例如:图表的K线走完模式,我用的15分周期K线,我想在收盘前提前5秒下单平仓。如何用代码来实现。
2楼
pyd 发表于:2014/9/19 14:11:28
tt:=(time0-timetot0(dynainfo(207))<=5) or not(islastbar);
3楼
zhou1980 发表于:2014/9/20 13:37:40
超版, tt:=(time0-timetot0(dynainfo(207))<=5) or not(islastbar); 这个是对提前5秒的确认?

那具体下单的代码怎么写?
4楼
Ivan 发表于:2014/9/20 13:41:40
在开平仓条件里增加这个条件 and tt
5楼
zhou1980 发表于:2014/9/24 9:58:35
我加上个  and TIME>=1459; 是不是就能实现每天收盘前提前5秒下单离场。

tt:=(time0-timetot0(dynainfo(207))<=
5) or not(islastbar) and TIME>=1459; 

 if tt  then begin
  sell(holding>0,0,marketr);
  sellshort(holding<0,0,marketr);
 end
6楼
jinzhe 发表于:2014/9/24 10:06:45

TIME>=145900

不要偷懒

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


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