Rss & SiteMap

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

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

标题:求个计算模型亏损赢利次数图表代码

1楼
wdbbs 发表于:2014/4/1 11:05:05
就是想写个计算亏损次数,赢利次数来控制仓位,图表版的,好像要用全局,全局不太熟,求高手写写.
2楼
jinzhe 发表于:2014/4/1 11:13:47

variable:n=0;

variable:m=0;

if holding>0 and 平多条件 then begin

   sell..........;

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

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

end

 

if holding<0 and 平空条件 then begin

   sellshort........;

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

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

end

 

n是盈利次数,m是开仓次数

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


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