以文本方式查看主题

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

--  作者:kongfzchina
--  发布时间:2013/7/8 9:43:26
--  请教高手
我想卖在买一 买在卖一,如何修改下面的下单组件

longcond:=a;
shortcond:=b;;

if holding=0 then begin
 if longcond then
  buy(1,N1,THISCLOSE);
end

if holding=0 then begin
 if shortcond then
  buyshort(1,N1,THISCLOSE);
end

if holding>0 then begin
 if shortcond then begin
  sell(1,holding,THISCLOSE);
  buyshort(1,N1,THISCLOSE);
 end 
 

end

if holding<0 then begin
 if longcond then begin
  sellshort(1,holding,THISCLOSE);
  buy(1,N1,THISCLOSE);
 end

end











收益:asset,noaxis,colorred;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;

--  作者:fly
--  发布时间:2013/7/8 10:22:44
--  
类似这样改写,就是当时的对手价下单 
buyshort(1,N1,LIMIT,C-MINDIFF); 
 
 buy(1,N1,LIMIT,C+MINDIFF);
 
 

--  作者:kongfzchina
--  发布时间:2013/7/8 11:07:00
--  
谢谢