Rss & SiteMap

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

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

标题:[求助]老师 看看这个表达怎么写?

1楼
rfgvb 发表于:2014/3/31 10:05:18
AA BB 2条线 
A=CROSS(AA,BB)  记录为 A=1
B=cross(BB,AA) 记录为 B-1

满足多条件  AND A=1 开多  ,平多  A=0

满足空条件 AND  B=-1 开空 ,平空  B=0
2楼
jinzhe 发表于:2014/3/31 10:13:11

variable:a=0,b=0;

if cross(aa,bb) then a:=1;

if cross(bb,aa) then a:=-1;

 if 多条件 and a=1 and holding>0 then begin

  sell(1,0,market);

  a:=0;

end

 

if 空条件 and b=-1 and holding<0 then begin

   sellshort(1,0,market);

   b:=0;

end

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


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