No announcement yet.

Partner 728x90


Sync or no sync?

  • Filter
  • Time
  • Show
Clear All
new posts

    Sync or no sync?

    Hi ninja community

    so I have multiple strategies I want to run on one account at the same time.

    should I sync them or not?

    I have tried to figure this out myself but was left confused

    I just want them to trade as they would if it was just the single strategies

    so if one strategy gives a buy single then buy and if another strategy gives a buy single then just buy again. When stop or take profit is hit on one then just close the positions from that strategy Snd just leave the other position until it meets its own stop/take profit criteria from its own strategy

    thanks for any help

    Hello jmahon,

    Thank you for your post.

    Multiple strategies may be run independently on a single account. However, placing manual trades to an account/instrument that has a strategy running, or running multiple strategies on the same instrument/account can cause the strategy to de-sync with the account. If a strategy is out of sync with the account, it can prevent the strategy trades from being profitable.

    When a strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions.)

    Wait Until Flat will wait until this virtual/historical position is closed before live orders can be submitted. It ensures that the strategy starts trading live from a flat position. If you enable the strategy when the account is flat, the strategy will waiting until this position calculated from historical data is closed so it is logically making trades starting from an entry signal.

    Immediately Submit automatically submits working orders from when the strategy processed historical data, and assumes the strategy position and account position are where you want it when you enable the strategy. This is typically used to have a strategy resume a position after disabling/enabling. If the strategy already had live orders running, the orders will resume with the new enablement of the strategy if they match the historically calculated orders. If the orders calculated from historical data do not match the live working orders, the live working orders will be cancelled and replaced by those calculated from historical data.

    Sync Account Positions is an additional option that has NinjaTrader submit an order to sync the account position to the position calculated by the strategy. (Not the other way around.)

    Adopt Account Position would be used if you want the strategy to inherit the Account Position upon enablement. This requires additional programming.
    If you do not want the strategy to calculate a position from processing historical data. Simple add if (State == State.Historical) return; to the top of your strategy logic so historical processing is skipped. The strategy will then always start from a flat position because it has not calculated any orders.

    Note: The sync column in the Strategies tab of the Control Center compares only the individual strategy position to the account position, it will not generate a total strategy position for all strategies run on the same instrument/account combination.

    For Multi-Instrument strategies, a small red flag can appear to the right of the sync value - this would alert the user to expand the row to check the sync for any additional instruments the strategy trades as well.

    Here are a couple of Help Guide links with more information about Strategy Position vs Account Position and Start Behavior.

    Strategy vs. Account Position —
    Start Behaviors —

    Please let us know if we may further assist.
    Brandon H.NinjaTrader Customer Service


      Hi Brandon thanks for the reply.

      so i should have all 3 strategies synced when running multiple strategies on one account?

      here is a example:

      strategy A has me long 1 contract

      strategy B shorts 1 contract

      with strategies synced my account position will 1 long 1 short on the same instrument? - this is what I want

      what I don’t won’t is the short to close the Long so my account position is flat.

      I have read the link you posted already and they don’t explain this

      thanks again for any help


        Hello jmahon,

        Thank you for your reply.

        The position for the account and the position for the strategy are separate. It is possible for the position of a strategy to be out of sync with the position of an account.

        Below are links to the Help Guide on this.

        Using two NinjaScript Strategies that are placing orders in opposite directions would also be affected by this. Since The Strategy Position and the Account Position are separate, if one strategy has taken a long position and is showing long 1, and the other has taken a short position and is showing short 1, the account position would be flat and neither strategy would be in sync with the account.

        Further, NinjaTrader does not support hedging (going long and short at the same time).

        Here is a link to a video that demonstrates this for NinjaTrader 8.

        To truly have an open long account position and an open short account position on the same instrument (instead of a net flat account position), this would require placing trades to two different accounts. One account to hold a long position, the other account to hold a short position.

        In NinjaTrader it is possible to create additional Sim accounts to use for practice trading this scenario.

        To add addition Sim accounts in NinjaTrader 8:
        • On the Control Center select the Accounts tab
        • Right-click the grid in the Accounts tab -> select Add Simulation Account
        • Type a name for the new account in the Name field if desired
        • Click OK

        If you are wanting to just keep track of what would have happened if you had taken the opposite trade at the same time, its absolutely helpful to have multiple accounts (sim, live demo, or actual funded brokerage account).

        Please let us know if we may further assist.
        Brandon H.NinjaTrader Customer Service


          Okay cool. thanks for your help Brandon.



          Latest Posts


          Topics Statistics Last Post
          Started by asgandabdoil, Yesterday, 10:48 PM
          0 responses
          Last Post asgandabdoil  
          Started by asgandabdoil, Yesterday, 10:47 PM
          0 responses
          Last Post asgandabdoil  
          Started by soon123, Yesterday, 07:37 PM
          2 responses
          Last Post s.kinra
          by s.kinra
          Started by MKV17, Yesterday, 07:16 PM
          0 responses
          Last Post MKV17
          by MKV17
          Started by BrennanSalibrici, Yesterday, 07:03 PM
          0 responses
          Last Post BrennanSalibrici