Rss & SiteMap
金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/
那么在开空之后才出现“ 价格大于平多价格”,需不需补多仓?
用个全局变量记录一下补仓状态即可,bj=1时表示补过仓了,然后收盘重置
variable:bj=0;
if type(1)=2 and holding>=0 and bj=0 and h>exitprice then begin
buy(1,1,marketr);
bj:=1;
end
在代码的最后加这样一句:
if time=closetime(0) then bj:=0;