Failed orders

Hello,

I started using a strategy with pyramiding entries on multiple USD-M contracts. Here’s the strategy message I’m using for all of them:
{
“symbol”:“{{ticker}}”,
“side”:“{{strategy.order.action}}”,
“positionSide”:“BOTH”,
“investmentType”:“notional_value”,
“amount”:“1000”,
“price”:“market”,
“reduceOnly”:false,
“positionMode”:“one_way_mode”,

My first problem is that Binance is closing my trades partially, always one entry worth of contracts instead of the whole position. Someone suggested using “amount”:“{{strategy.order.contracts}}” instead of “amount”:“1000”, but I can edit that line in Tradingview only, and I guess the strategy messages have to match on both sides.

I also had a failed order one time when the strategy tried to close the trade. The reason for the failed signal was “quantity less than zero”. I’m not sure what this refers to, but as you see the strategy message has “amount”:“1000”, and I had open trades for this pair waiting to be closed by this signal.

Thank you for your help!