looking for a logical explanation what went wrong.
Selected StartBehavior=ImmediatelySubmitSynchronizeAccount to sync account with strategy on startup. My understanding is that NT submits a market order to align both.
But it's getting rejected. And the error "Insufficient Funds" son't make sense at all.
2019-05-06 09:39:47:374|1|4|Enabling NinjaScript strategy 'TfsBollingerMarketMakerV2.1/168558367' : On starting a real-time strategy - StartBehavior=ImmediatelySubmitSynchronizeAccount Position=EURUSD 635L AccountPosition=EURUSD 3792L EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions, ignore order rejections ExitOnSessionClose=False SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On each tick IsUnmanaged=True MaxRestarts=4 in 5 minutes
2019-05-06 09:39:47:374|1|4|NinjaScript strategy 'TfsBollingerMarketMakerV2.1/168558367' submitting order
2019-05-06 09:39:47:375|1|4|Syncing account position on starting strategy 'TfsBollingerMarketMakerV2.1/168558367'. Account position='3792L EURUSD' Strategy position='L EURUSD'
2019-05-06 09:39:48:016|1|32|Order='680900206/401386179' Name='Sell' New state='Submitted' Instrument='EURUSD' Action='Sell' Limit price=1.12016 Stop price=0 Quantity=1,270 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
2019-05-06 09:39:48:016|1|32|Order='0/401386179' Name='Synchronize' New state='Rejected' Instrument='EURUSD' Action='Sell' Limit price=0 Stop price=0 Quantity=3,157 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='Order rejected' Native error='Instruction processing has resulted in a Red Card. Please check details. Insufficient Funds.'
2019-05-06 09:39:48:016|0|32|401386179, Instruction processing has resulted in a Red Card. Please check details. Insufficient Funds. affected Order: Sell 3157 Market
Comment