Rss & SiteMap

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

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

标题:全平

1楼
pxmygl 发表于:2014/8/22 9:13:17
每天15:10全平
如何加代码使每月第二个星期五自动转为14:50全平
2楼
jinzhe 发表于:2014/8/22 9:26:22

variable:n=0;

if month<>ref(monthe,1) then n:=0;

if weekday=5 then n:=n+1;

if n=2 and weekday=5 and time=145000 then begin

   sell........;

   sellshort........;

end

3楼
pxmygl 发表于:2014/8/22 9:38:28
variable:n=0;
sell(time>151000 and holding>0, 0, market); //1.该句是否需加入n=0
sellshort(time>151000 and holding<0, 0, market);

if month<>ref(monthe,1) then n:=1;

if weekday=5 then n:=n+1;

if n=2 and weekday=5 and time=145000 then begin

   sell(time>145000 and holding>0, 0, market);

   sellshort(time>145000 and holding<0, 0, market);

end

2.这样对不对?

3.n是否对

4楼
jinzhe 发表于:2014/8/22 9:49:07
照我的写,你这样n会多1
5楼
pxmygl 发表于:2014/8/22 10:09:59
明白了
谢谢
共5 条记录, 每页显示 10 条, 页签: [1]


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