I’m trying to execute multiple long-only strategies on a single instrument within one account in NinjaTrader, but the FIFO approach is causing issues when trades overlap. My goal is for these overlapping trades to be entirely unaffected by each other.
Here’s what I’ve done:
- I’m using a modular approach, coding each strategy as an indicator and using BarsInProgress to manage trades with unique string IDs for each position.
- However, using Positions[x].MarketPosition to check each strategy's position state doesn’t work as expected. It seems NinjaTrader still views all trades as one aggregated position on the instrument, so if Positions[1] is Long, then Positions[2] also appears as Long, even if no trades were entered on data series 2.
- Is what I’m aiming to achieve possible in NinjaTrader?
- If I use custom variables to check position states (e.g., int strategy1Position = 1) instead of Positions[x], would this help bypass FIFO limitations on overlapping trades?
TL;DR: Is it possible to work around NinjaTrader’s FIFO approach to avoid interference among overlapping, same-instrument positions in a single multi-strategy script?
Any help is greatly appreciated!

Comment