Rss & SiteMap

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

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

标题:平仓时间怎么写?

1楼
LCY 发表于:2016/9/27 17:58:19

夜盘品种:夜盘收市前5分钟及日盘收市前5分钟(平仓);

日盘品种:收市前5分钟(平仓)。

日线及各分钟线都通用。平仓时间怎么写?

2楼
jinzhe 发表于:2016/9/28 9:02:36
这个没有通用写法
3楼
LCY 发表于:2016/9/28 22:55:48

夜盘品种:夜盘收市前5分钟及日盘收市前5分钟(平仓);

日盘品种:收市前5分钟(平仓)。

各分钟线都通用平仓时间怎么写?

4楼
jinzhe 发表于:2016/9/29 9:10:13

夜盘品种5分钟周期以下的:

if time0>=timetot0(closetime(1))-5*60 and time<=closetime(1) then begin

   sellshort(1,0,market);

   sell(1,0,market);

end

 

if time0>=timetot0(closetime(0))-5*60 and time<=closetime(0) then begin

   sellshort(1,0,market);

   sell(1,0,market);

end

 

夜盘品种5分钟周期以上的:

if (not(islastbar) or (timetot0(dynainfo(207))>=timetot0(closetime(1))-6*60) and timetot0(dynainfo(207))<timetot0(closetime(1)))) and time=closetime(1) then begin

   sell(1,0,market);

  sellshort(1,0,market);

end

 

if (not(islastbar) or (timetot0(dynainfo(207))>=timetot0(closetime(0))-6*60) and timetot0(dynainfo(207))<timetot0(closetime(0)))) and time=closetime(0) then begin

   sell(1,0,market);

  sellshort(1,0,market);

end

 

只有白天的需要删除上述代码各第一段

5楼
LCY 发表于:2016/10/4 8:49:30
if 5分钟周期及其以下 a,b;
怎么写?
6楼
LCY 发表于:2016/10/6 23:24:28
x:=if (5分钟周期及其以下, a,b);
5分钟周期及其以下怎么写?
7楼
jinzhe 发表于:2016/10/8 10:20:26
这个不能这样归纳,用我上面的方法分开写
8楼
LCY 发表于:2016/10/8 17:09:41
以下是引用jinzhe在2016-10-8 10:20:26的发言:
这个不能这样归纳,用我上面的方法分开写

为什么呀?
9楼
jinzhe 发表于:2016/10/8 17:12:35
周期是datatype,5分钟以下的和5分钟以上并不能有效区分
10楼
LCY 发表于:2016/10/8 22:37:12
哦。datatype返回值0~19的定义划分欠考虑呀
共28 条记录, 每页显示 10 条, 页签: [1] [2][3]


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