Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy extra entries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strategy extra entries

    I compiled a strategy on NT8 and I get extra orders. How can I check the cause?

    #2
    Click image for larger version

Name:	extra entries.jpg
Views:	242
Size:	68.3 KB
ID:	1119503 Here is a picture. I have oeder set for 2 entries and got 6?

    Comment


      #3
      Hello JTizz,

      Thanks for opening the thread.

      A strategy will place orders when your logic has allowed order submission methods to be reached. Understanding why your logic has allowed order submission methods to be reached requires taking debugging steps to review how your logic is executing.

      Also keep in mind, strategy positions are not the same as the account position. In your screenshot, we can see that the strategy closed two entries of one contract with a Profit target, and then entered twice with one contract on the next bar. Your account is 6 short though. You may check the Strategies tab of the Control Center to view the Strategy Position and the Account Position. I have included some educational information on Start Behaviors and Strategy/Account Position at the end of my post.

      Strategies tab - https://ninjatrader.com/support/help...eStrategiesTab

      If the strategy and the account are in sync, then it would seem that the strategy created a position of 6 short with its logic. You would want to then identify which trades have created that position and then take debugging steps to see why the strategy logic has allowed those trades to take place.

      Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm

      Debugging in the Strategy Builder - https://drive.google.com/file/d/1mTq...w?usp=drivesdk

      Start Behavior education
      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 on enablement. This requires additional programming.

      If you do not want the strategy to calculate a position from processing historical data. Simply 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.

      Strategy vs. Account Position — https://ninjatrader.com/support/help..._account_p.htm
      Start Behaviors — https://ninjatrader.com/support/help..._positions.htm
      We look forward to assisting.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      41 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X