Rss & SiteMap

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

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

标题:胜率计算

1楼
XXL 发表于:2017/2/16 17:01:49
当前光标位置的前100次开平仓的胜率计算怎么写


2楼
jinzhe 发表于:2017/2/16 17:14:30

variable:m=0;

 

if 平多条件 and holding>0 then begin

   sell(1,0,marketr);

  

   if numprofit(1)>0 then m:=m+1;

end

 

if 平空条件 and holding<0 then begin

   sellshort(1,0,marketr);

 

   if numprofit(1)>0 then m:=m+1;

end

c1:=平多条件 and holding<> ref(holding,1);

c2:=平空条件 and holding<> ref(holding,1);

nn:=sumbars(c1 or c2,100);

胜率:(m-ref(m,nn))/100;

 

 

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


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