Rss & SiteMap

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

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

标题:怎么限制每天开一次仓

1楼
jetzhu 发表于:2014/7/11 15:16:24
怎么限制每天开一次仓
2楼
jinzhe 发表于:2014/7/11 15:21:20

variable:n=0;

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

if n=0 and 持仓判断 and 开多条件 then begin

      buy.........;

      n:=1;

end

 

if n=0 and 持仓判断 and 开空条件 then begin

       buyshort........;

       n:=1;

end

3楼
jetzhu 发表于:2014/7/11 15:23:09
多空各一次 呢?
4楼
jinzhe 发表于:2014/7/11 15:24:07

variable:m=0,n=0;

if date<>ref(date,1) then begin

    m:=0;

     n:=0;

end

if m=0 and 持仓判断 and 开多条件 then begin

      buy.........;

      m:=1;

end

 

if n=0 and 持仓判断 and 开空条件 then begin

       buyshort........;

       n:=1;

end

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


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