Rss & SiteMap

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

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

标题:收盘前

1楼
fxrock4 发表于:2016/8/18 10:58:10
A条件开仓的单至交易所收盘前5分钟平仓(包括日盘和夜盘)。怎么写,多谢。
2楼
jinzhe 发表于:2016/8/18 11:02:30

 t1:=time>opentime(1) and time0<=timetot0(closetime(1))-5*60;

t2:=time>opentime(2) and time0<= timetot0(closetime(0))-5*60;

开仓条件加入  (t1 or t2)

3楼
fxrock4 发表于:2016/8/18 11:30:49
//开仓
t1:=time>opentime(1) and time0<=timetot0(closetime(1))-5*60;
t2:=time>opentime(2) and time0<= timetot0(closetime(0))-5*60;

if 跳升 and (t1 or t2)  and  holding=0  then begin
   buy(holding=0,50%,market),pertrader;
   

end

===========开仓后就平仓了。哪不对呢?

[此贴子已经被作者于2016-8-18 11:31:24编辑过]
4楼
jinzhe 发表于:2016/8/18 11:31:51

开仓后立即平仓说明你的平仓条件是很容易满足的

[此贴子已经被作者于2016-8-18 11:32:22编辑过]
5楼
fxrock4 发表于:2016/8/18 12:23:56
平仓条件就是收盘前5分钟。按你上面的没到收盘前5分钟就平仓。
[此贴子已经被作者于2016-8-18 12:24:35编辑过]
6楼
jinzhe 发表于:2016/8/18 13:13:37

if (time0=timetot0(closetime(1))-5*60) or (time0=timetot0(closetime(0))-5*60) then begin

    sell(1,0,market);

    sellshort(1,0,market);

end

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


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