以文本方式查看主题

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

--  作者:punkcat401
--  发布时间:2013/12/9 9:53:40
--  请教关于反手

多头平仓后,如果满足条件B才反手做空,是这样写吗

 

If 条件A then begin

sell( ),Orderqueue;    

IF 条件B then buyshort( ),Orderqueue;

END 


--  作者:jinzhe
--  发布时间:2013/12/9 10:01:09
--  

variable:n=0;

if a and holding>0 then begin

sell;

n:=1;

end

 

if b and holding=0 and n=1 then begin

buyshort;

n:=0;

end