if enlong then
begin
sellshort(holding<0,0,market);
buy(holding<1,1,market);
end
//开多
if enlongA then
buy(holding=1,1,market);
//加多
if exlong then
sell(holding>=1,0,market);
//平多
if enshort then
begin
sell(holding>0,0,market);
buyshort(holding>-1,1,market);
end
//开空
if enshortA then
buyshort(holding=-1,1,market);
//加空
if exshort then
sellshort(holding<=-1,0,market);
//平空
将上面一段代码的开仓数的1改为下面一段代码中7,就没有加仓信号出现了,为什么。
if enlong then
begin
sellshort(holding<0,0,market);
buy(holding<1,7,market);
end
//开多
if enlongA then
buy(holding=7,7,market);
//加多
if exlong then
sell(holding>=1,0,market);
//平多
if enshort then
begin
sell(holding>0,0,market);
buyshort(holding>-1,7,market);
end
//开空
if enshortA then
buyshort(holding=-7,7,market);
//加空
if exshort then
sellshort(holding<=-1,0,market);
//平空
估计是没资金了,到该策略的交易系统编辑器--费率设置里,调大资金