您好,
如果判断Buy Position或Sell Position,先要使用Positions Viewer仓位观测器,使用All Positions,然后命名My_Positions。然后用If block比较My_Positions.Position Amount仓位数量和1,如果My_Positions.Position Amount<1,说明没有仓位,这样就可以Open at Market Buy入市开仓买多。如果My_Positions.Position Amount>=1,说明有仓位,然后用If block比较My_Positions.Position is Long=false,也就是没有多头仓位,在这个情况下Open at Market Buy入市开仓买多。请看截图。