以文本方式查看主题

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

--  作者:wtx128153
--  发布时间:2009/12/9 11:13:28
--  请老师指点

 

if BP then
   begin
   Tsellshort(BP,Tholding<0,0,LMT,C);
end
if BK then
  begin
  Tsellshort(BP,Tholding<0,0,LMT,C);
  Tbuy(BK and THOLDING=0,1,LMT,C);
end
if SP then
  begin
  Tsell(SP,Tholding>0,0,LMT,C);
end
if SK then
  begin
  Tsell(BP,Tholding<0,0,LMT,C);
  Tbuyshort(SK and THOLDING=0,1,LMT,C);
end

 

 

 

if BP then
   begin
   Tsellshort(BP and Tholding<0,0,LMT,C);
end
if BK then
  begin
  Tsellshort(BP and Tholding<0,0,LMT,C);
  Tbuy(BK and THOLDING=0,1,LMT,C);
end
if SP then
  begin
  Tsell(SP and Tholding>0,0,LMT,C);
end
if SK then
  begin
  Tsell(BP and Tholding<0,0,LMT,C);
  Tbuyshort(SK and THOLDING=0,1,LMT,C);
end
 

上下两段代码那段是正确的,上能开仓,但不能平仓,请老师改正,要求开仓平仓分开,尽量不要反手,谢谢!


--  作者:wtx128153
--  发布时间:2009/12/9 11:17:01
--  


2009-12-09 10:43:47
88944 : m1009 - 已提交

2009-12-09 10:43:49
88944 : m1009 - 已撤单报单被拒绝不被支持的报单类型


--  作者:wtx128153
--  发布时间:2009/12/9 12:03:08
--  
if BP then
   begin
   Tsellshort(Tholding<0,tholding,LMT,C);
end
if BK then
  begin
  Tsellshort( Tholding<0,tholding,LMT,C);
  Tbuy( THOLDING=0,1,LMT,C);
end
if SP then
  begin
  Tsell( Tholding>0,tholding,LMT,C);
end
if SK then
  begin
  Tsell ( Tholding<0,tholding,LMT,C);
  Tbuyshort( THOLDING=0,1,LMT,C);
end
这样写是不是就写正确了吗?