Rss & SiteMap

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

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

标题:求助:如何取时间秒数

1楼
定盘星 发表于:2015/7/14 8:38:47
求助:如何取得上次开仓到本次平仓或本次开仓的秒数?    谢谢
2楼
jinzhe 发表于:2015/7/14 8:43:19

这个就需要用到后台的全局变量了,提醒下不要用在图表交易的交易判断上

if 开仓条件 and holding=0 and extgbdata('time')<>time then begin

 

     buy.......;

     extgbdataset('time',time);

     extgbdataset('ms',timetot0(dyninfo(207)));

end

 

 

if 平仓条件 and holding>0 and extgbdata('tt')<>time then begin

    

    sell.......;

    extgbdataset('tt',time);

    extgbdataset('sj',timetot0(dynainfo(207)));

end

 

所用时间为: extgbdata('sj')-extgbdata('ms');

3楼
定盘星 发表于:2015/7/14 8:58:47
  and extgbdataset('tt',time);这里的tt怎么定义的?
4楼
jinzhe 发表于:2015/7/14 9:00:33
不需要定义,后台全局变量可以直接赋值,初始值默认为0
共4 条记录, 每页显示 10 条, 页签: [1]


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