以文本方式查看主题

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

--  作者:系统使用者
--  发布时间:2012/10/19 12:00:04
--  问一个问题。

if holding=0 then begin
 if  x+y>0 then
  buy(1,30%,limitr,open-0.2);
end
if holding=0 then begin
 if x+y<0 then
  buyshort(1,30%,limitr,open-0.2); 
end

if holding>0 then begin
 if x+y<0 then begin
  sell(1,holding,limitr,open-0.2);
  buyshort(1,30%,limitr,open-0.2);
 end
end
if holding<0 then begin
 if x+y>0 then begin
  sellshort(1,holding,limitr,open-0.2);
  buy(1,30%,limitr,open-0.2);
 end
end

 

这样设计是否可以在信号出现的时候开盘价能成交?


--  作者:系统使用者
--  发布时间:2012/10/19 12:22:39
--  

或者直接使用滑点

variable:DHcDs=1;{多、空单滑点数}

if holding=0 then begin
 if  x+y>0 then
  buy(1,30%,limitr,open-DHcDs);
end
if holding=0 then begin
 if x+y<0 then
  buyshort(1,30%,limitr,open-DHcDs); 
end

if holding>0 then begin
 if x+y<0 then begin
  sell(1,holding,limitr,open-DHcDs);
  buyshort(1,30%,limitr,open-DHcDs);
 end
end
if holding<0 then begin
 if x+y>0 then begin
  sellshort(1,holding,limitr,open-DHcDs);
  buy(1,30%,limitr,open-DHcDs);
 end
end

 

这样写可以否?


--  作者:jinzhe
--  发布时间:2012/10/19 13:29:42
--  

会以指定价报单,具体以什么价成交要看具体交易了


--  作者:sunjunwin
--  发布时间:2012/10/20 20:56:17
--  

滑点肯定是有的 只不过滑点的话我能想到的也就用限价单来控制下 别无她发 求个大侠指教