variable:cc=0;
variable:mrj=0;
variable:mcj=0;
variable:zc=0;
variable:fy=0;
buycond:=ma(c,10)>ma(c,60);
sellcond:=ma(c,10)<ma(c,60);
if barpos=1 then cishu:=0;
if cc>0 and sellcond then begin
zc:=zc+(c-mrj)*10;
cishu:=cishu+1;
cc:=0;
end
if cc<0 and buycond then begin
zc:=zc+(mcj-c)*10;
cishu:=cishu+1;
cc:=0;
end
if cc=0 and buycond then begin
mrj:=c;
cc:=1;
end
if cc=0 and sellcond then begin
mcj:=c;
cc:=-1;
end
if cc>0 then begin
fy:=(c-mrj)*10;
end
if cc<0 then begin
fy:=(mcj-c)*10;
end
资产:zc+fy,noaxis;
平均盈利:资产/cishu;
标准差:((每一笔交易的盈亏-平均盈利)*(每一笔交易的盈亏-平均盈利))/cishu;
平均盈利及cishu都为已知。
每一笔交易的盈亏:从第一个信号到最后一个信号,每一次平仓信号的盈亏。
如何实现?
http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=12645
下个版本很快就将推出
届时将增加大量统计函数 个人觉得这个版本推出了 您直接可以使用
敬请期待