Rss & SiteMap

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

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

标题:怎么查询当前仓位盈亏情况

1楼
gzarmstrong 发表于:2015/3/14 0:34:42
怎么查询当前仓位盈亏情况?包括:总盈利亏损多少?平均每手盈亏多少?
2楼
jinzhe 发表于:2015/3/16 9:05:18

variable:n=0,m=0,k=0;

if 平空条件  and holding<0 then begin

    sellshort(1,0,market);

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

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

    k:=K+1;

end

 

if 平多条件  and holding<0 then begin

    sell(1,0,market);

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

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

    k:=K+1;

end

总盈利:m;

总亏损:n;

总交易次数:k;

平均盈利:(m+n)k;

 

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


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