以文本方式查看主题

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

--  作者:么么
--  发布时间:2016/3/16 9:46:46
--  浮动盈亏
老师,为啥我浮动盈亏一直没有信号,我现在账户上也没持仓的,浮动也为0;
2016-03-16 09:44:08.068    oo:12510
2016-03-16 09:44:08.069    oo+4*mindiff:12530
2016-03-16 09:44:08.069    oo+4*mindiff>c:0
2016-03-16 09:44:08.070    oo+2*mindiff:12520
2016-03-16 09:44:08.070    c>ma60:1
2016-03-16 09:44:08.071    tbuyholding(1)<50:1
2016-03-16 09:44:08.071    taccount(4)>0:0


--  作者:jinzhe
--  发布时间:2016/3/16 9:51:49
--  

看不懂你讲的和下面的调试信息之间的联系


--  作者:么么
--  发布时间:2016/3/16 9:53:52
--  
taccount(4)>0:0一直没有信号,
--  作者:么么
--  发布时间:2016/3/16 9:54:36
--  
if oo+4*mindiff>c and  c>oo+2*mindiff and c>ma60  and extgbdata(\'bdnum1\')=0 and tbuyholding(1)<50 and taccount(4)>0  then begin
tbuy(1,25,lmt,close);
extgbdataset(\'bdnum1\',1);
END

if oo+6*mindiff>c and  c>oo+4*mindiff and c>ma60 and extgbdata(\'bdnum2\')=0 and tbuyholding(1)<50 and taccount(4)>0  and tenterbars>1 then begin
tbuy(1,24,lmt,close);
extgbdataset(\'bdnum2\',1);
END

--  作者:jinzhe
--  发布时间:2016/3/16 10:01:28
--  
没持仓?那么浮动盈亏就是0,你的>0的条件自然不成立
--  作者:么么
--  发布时间:2016/3/16 10:05:13
--  
老师,懂了,谢谢