以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  统计次数  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=74085)

--  作者:定盘星
--  发布时间:2015/1/7 11:29:34
--  统计次数
统计日内连赢和连亏次数怎么写,MAXSEQLOSS是当前数据以来的,我想统计当天的,谢谢
--  作者:jinzhe
--  发布时间:2015/1/7 11:32:54
--  

variable:n=0,m=0;

if 平空条件 and holding<0 then begin

   sellshort......;

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

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

end

 

if 平多条件 and holding>0 then begin

   sell......;

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

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

end

 

if closetime(0)=time then begin

    n:=0;

    m:=0;

end

 

n是连赢次数,m是连亏次数


--  作者:定盘星
--  发布时间:2015/5/15 7:33:43
--  
再请教一下:如何把n、m输出到屏幕?
--  作者:jinzhe
--  发布时间:2015/5/15 8:55:39
--  

nn:n,linethick0;

mm:m,linethick0;