Guide · Strategy settings

Strategy start behavior explained: wait until flat, immediately submit, synchronize account

Why a strategy can believe it's in a trade the moment you enable it, what each Start behavior option does about that, and which one makes sense for a session-based bot.

Strategy start behavior explained: wait until flat, immediately submit, synchronize account: cover illustration

Short answer. Start behavior decides what a NinjaTrader strategy does about the position it calculated on historical bars when you enable it. The default, Wait until flat, sends nothing real until the strategy's own calculated position is flat. Immediately submit trusts that your account already matches. The "synchronize account" versions send market orders to make the account match, and can open or close real positions.

Strategy position vs account position

NinjaTrader tracks two positions that are easy to confuse:

  • The strategy position is what the strategy believes it holds, based on its own orders and calculations. It's shown on the Strategies tab of the Control Center.
  • The account position is what your account actually holds. It's shown on the Positions tab.

When everything is working, the two match. But they can drift apart: a manual trade on the same instrument and account, a second strategy on the same instrument, an order you cancelled by hand, or a strategy that starts with a calculated position the account doesn't have. NinjaTrader's help guide warns that placing manual trades or running several strategies on the same instrument can put the two out of sync.

Why a strategy "thinks" it's in a trade when you enable it

When you enable a strategy, NinjaTrader first runs it over the historical bars loaded on the chart, from the start of the data up to now. During that pass, the strategy "trades" its rules on history. Nothing is sent to your account; these are virtual trades. If the rules were in a position when the historical pass reaches the present moment, the strategy starts life believing it holds that position, even though your account is flat.

That's not a bug. It's how the strategy keeps its indicators, counters and state consistent. Start behavior is the setting that decides what to do about the gap between that virtual position and your real one.

You tick EnabledStrategy positionAccount positionLong (historical, virtual)Flat: now in syncLongLong (real)Wait until flat: no real order until the virtual trade ends
Wait until flat: the strategy starts inside a virtual long from its historical pass, and sends its first real order only after that virtual trade ends.

The five start behavior options

You'll find Start behavior in the strategy's properties when you add it to a chart or the Strategies tab. NinjaTrader's help guide (the Syncing Account Positions page) describes each option; here's what they mean in practice.

Wait until flat (the default)

This is the least disruptive option. On start, the strategy cancels any working orders it previously placed on the account. Then:

  • If the strategy position is flat, it assumes the account is flat too, and the next order it places is a real one.
  • If the strategy position is not flat, it keeps trading virtually until its calculated position reaches or crosses flat. From then on its orders are real.

While it's waiting, the strategy is shown in yellow on the Strategies tab. The help guide's critical note: if your account isn't actually flat at the moment the strategy reaches flat, the two will be out of sync. Wait until flat assumes you started with a flat account.

Wait until flat, synchronize account

Same as above, plus a check of the real account. After cancelling its old orders, the strategy compares the account position with flat. If the account isn't flat, NinjaTrader submits a market order to flatten it. Then the strategy waits for its own calculated position to be flat before trading for real. That reconciling market order is sent outside the strategy, so the strategy's own order handling doesn't see it.

Immediately submit

The strategy starts acting on its calculated state right away. Working orders it placed before that match its current orders exactly (same action, type, quantity and prices) are kept and mapped to the strategy; others are cancelled; any remaining strategy orders are sent. It assumes the account already matches the strategy position. Use it only when you're sure that's true, for example when you've restarted a strategy that was in a real position and nothing changed in between.

Immediately submit, synchronize account

Like Immediately submit, then the strategy compares the account position with its own. If they don't match, NinjaTrader sends a market order to make the account match the strategy. That can open a real position the moment you enable the strategy, because the historical pass said it should be in one.

Adopt account position

The strategy ignores its historical virtual position and starts with whatever the account actually holds. This option only appears if the developer programmed the strategy to handle it. The help guide adds that only one strategy with this setting can run per account and instrument, and the account can't have working orders placed outside that strategy.

Start behavior options compared
OptionCan it send orders on start?Assumes about your accountTypical use
Wait until flatNo real orders until the strategy is flatAccount is flatDefault; most session bots
Wait until flat, synchronize accountYes: a market order to flatten the account if it isn't flatNothing; it flattensA clean flat start without checking by hand
Immediately submitYes: the strategy's current ordersAccount already matches the strategyRestart of a strategy that was in a real position
Immediately submit, synchronize accountYes: orders plus a market order to match the strategyNothing; it makes the account matchAdvanced use only
Adopt account positionYesStrategy takes over the real positionOnly if the developer built for it

The synchronize options place real market orders. NinjaTrader's help guide warns that synchronizing can close or place trades on your account. Read what each option does before you choose it, and test it on a simulated account first.

Sensible defaults for a session-based bot

A bot that trades one session and is flat by its daily exit has a simple life: at the start of each session it should be flat, and so should the account. For that pattern:

  • Wait until flat is the natural choice. If the historical pass ends inside a trade, the strategy simply sits out that trade rather than jumping in late at a worse price.
  • Enable it before its session starts, while it's flat. Then the historical pass ends flat and the first signal of the session is a real one.
  • Check the account is flat on the Positions tab before you enable it, so the "account is flat" assumption is true.
  • Use the synchronize options only if you understand them, and never as a way to "catch up" on a trade the strategy took on history.

Always follow the strategy's own documentation if it recommends a specific setting. A strategy designed for Adopt account position, for example, will say so.

A worked example

Say a New York session strategy on MNQ is enabled at 10 AM ET, half an hour after the 9:30 AM open. On the historical pass, its rules took a long at the open and that trade is still open at 10 AM.

  • Wait until flat: the strategy row turns yellow. The virtual long carries on until the rules exit it, say at 10:20. From then on, the next signal is a real order. Your account never held that first trade.
  • Immediately submit: the strategy behaves as if the long exists, and sends its stop and target for it. Your account is flat, so those exit orders would act on a position that isn't there. That's why this option needs the account to already match.
  • Immediately submit, synchronize account: NinjaTrader buys at market to give the account the long the strategy believes it has, at the 10 AM price rather than the open.

In this example only Wait until flat leaves the account doing what you'd expect. Enabling the strategy before 9:30 AM would have avoided the question entirely.

Restarting mid-session and after disconnects

Restarts are where start behavior matters most, because the strategy may have been in a real trade when it stopped.

  1. Look before you restart. Check the Positions tab and the Orders tab. Is there a real position? Are there working stop or target orders?
  2. If the account is flat and the strategy's historical pass also ends flat, any option behaves calmly. Wait until flat is the simple choice.
  3. If the account has a position from the strategy, Wait until flat won't manage it: the strategy trades virtually and the real position sits there. You either manage that position yourself, or use Immediately submit if the strategy's recalculated position matches the account exactly.
  4. After a disconnect, the Connection loss handling setting decides whether the strategy kept running, recalculated or stopped. With the default, Recalculate, a strategy stopped by the outage recalculates its position when the connection returns. Check the Log tab to see what happened.

Our VPS guide explains the connection loss options and why a machine that stays up avoids most of these situations.

Common mistakes

  • Enabling a strategy in the middle of its session and wondering why it doesn't trade. It's yellow on the Strategies tab: it's waiting until flat.
  • Choosing a synchronize option to make it trade now. That sends a market order at the current price, which is not the price the historical trade "entered" at.
  • Trading the same instrument by hand on the same account. The strategy doesn't know about your trade, so the two positions drift apart.
  • Running two strategies on the same instrument and account. Each keeps its own position, and the account holds the sum. NinjaTrader has a Synchronize All Strategies command on the Strategies tab, but it only considers strategies that aren't set to Wait until flat, and it also sends market orders.
  • Cancelling a strategy's orders one by one instead of disabling it. Disable the strategy, then deal with anything left on the Orders and Positions tabs.

FuturesBotLab bots such as Nasdaq Reload (MNQ · NQ) and Dow Rubber Band (MYM · YM) hold one position at a time and exit by the end of their session, which keeps start behavior simple. For the session close side of that, see exit on session close, and if a strategy isn't in the list at all, see strategy not showing.

A pre-enable checklist

  1. Positions tab: is the account flat on this instrument?
  2. Orders tab: are there any working orders left from earlier?
  3. Strategies tab: is another strategy already running on the same instrument and account?
  4. Strategy properties: is Start behavior set to what you intend, and do you know what that option sends?
  5. Clock: is the strategy's session about to start, or already under way? Enabling before the session keeps things simple.
  6. After enabling: is the row green, or yellow because it's waiting until flat?

Thirty seconds on this list prevents nearly every start-up surprise. If something doesn't look right, disable the strategy, fix the account first, and enable it again.

Free tools: tick value calculator · position size calculator · futures market hours · daily loss limit calculator.

Related guides

Bots mentioned in this guide

Futures trading involves substantial risk of loss and is not suitable for every investor. Past or hypothetical results don't guarantee future results. This guide is educational, not investment advice. Risk disclosure.

FAQ

Common questions

What does Wait until flat mean in NinjaTrader?

The strategy sends no real orders until its own calculated position is flat. If its run over historical bars ended in a trade, it trades virtually until that trade ends, then trades for real.

Why is my strategy yellow on the Strategies tab?

It's enabled and waiting until flat. Its calculated position from the historical bars isn't flat yet, so it won't send real orders until it is.

Does synchronize account place real orders?

Yes. The synchronize options send market orders to make your account flat or match the strategy's position. NinjaTrader warns they can open or close real trades.

Which start behavior should I use?

For most session-based strategies, Wait until flat, enabled while the account and strategy are both flat. Follow the strategy's own documentation if it recommends something else.

Why doesn't Adopt account position appear for my strategy?

It only appears when the developer programmed the strategy to handle a real account position. If it isn't offered, the strategy wasn't built for it.

What happens if I trade manually while a strategy runs?

The strategy doesn't know about your trade, so its position and the account position no longer match. Avoid trading the same instrument on the same account while a strategy runs.

Membership details

Let the bot follow the rules, so you don't have to.

Every bot, every update, one membership.