请问为什么写,为什么加不了仓bb:=cross(c,ma(c,300));
ss:=cross(ma(c,300),c);
trrr:if(holding>0,h-enterprice,0),noaxis;
if bb then
begin
sellshort(holding<0,0,limitr,ht+1*mindiff);
buy(holding=0,1,limitr,ht+1*mindiff);
end
if trrr>20 and holding>0 then
begin
buy(1,1,market);
end
if ss then
begin
sell(holding>0,0,limitr,lt-1*mindiff);
buyshort(holding=0,1,limitr,lt-1*mindiff);
end
1楼,肯定是你加仓条件不成立。你在即在策略中输出显示
例如: cond:trrr>20 and holding>0;
2楼:图表信号的平仓信号必须依赖于持有虚拟持仓。你只有平仓,没有开仓,平仓语句自然被过滤掉(无仓可平)。