Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Positions accounts exceeds entryhandling

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

    Positions accounts exceeds entryhandling

    Dear all.

    My strategy is developed based on EntryHandling.AllEntries=1.

    But in my account position appears 2 Long positions. I don´t know why add 1 new position in my strategy?.

    Attached you can find the executions and the positions.

    Bes regards
    Attached Files

    #2
    Hello memonic,

    Thanks for opening the thread.

    Strategies manage their own virtual position that is not to be confused with the Account position. This design is in place so you can run concurrent strategies on the same instrument and be able to go short and long at the same time, for example.

    The Strategies tab of the Control Center will tell you the strategies current virtual position as well as the account position on that instrument.

    To further troubleshoot a strategy to understand how it ended up in a certain position, debugging steps will need to be taken to monitor the logic that allowed the order methods to submit. We generally advise to add prints for the variables used to control your order entry conditions and to enable TraceOrders so you can observe the logic of your strategy as it processes in the Output window.

    An example of a good diagnostic print would be as follows:

    Code:
    Print("Entry Condition:  VarA: " + VairableA + " VarB: " + VariableB);
    if(VariableA == VariableB)
    {
    	Print("Condition true. Quantity: " + Quantity);
    	EnterLong(Quantity);
    }
    Debugging - http://ninjatrader.com/support/forum...ead.php?t=3418

    TraceOrders - http://ninjatrader.com/support/forum...ead.php?t=3627

    Account Position Vs. Strategy Position - http://ninjatrader.com/support/forum...ead.php?t=4033

    If you have any additional questions, please don't hesitate to write back.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks Jim.

      In this case, what is my current position. Position=1 or Acct.Position=2

      Best regards
      Attached Files

      Comment


        #4
        Hello memonic,

        The Strategy has a position of 1 long and the Account has an overall position of 2 long. The Account position includes the Strategy position.
        JimNinjaTrader Customer Service

        Comment


          #5
          hello Jim.

          But this account has only 1 strategy. and the strategy has EntryHandling.AllEntries=1.

          Comment


            #6
            Hello memonic,

            The Strategy has a position of 1 long. This makes sense if the strategy has an EntriesPerDirection value of 1.

            The account is out of sync with the strategy. This could be a result of enabling and disabling the strategy so it adds a position of 1 long to the account before it is enabled again and adds another position of 1 long to the account.

            This could also be from a manual order submission outside of the strategy.

            Please let me know if there is anything else I can do to assist you further.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by minds2010, Today, 03:38 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by DTSSTS, Yesterday, 07:11 PM
            2 responses
            32 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by ntbone, Yesterday, 11:42 PM
            2 responses
            17 views
            0 likes
            Last Post ntbone
            by ntbone
             
            Started by mr_trade, 11-26-2020, 05:01 PM
            5 responses
            59 views
            0 likes
            Last Post mr_trade  
            Started by evanp90, 01-14-2021, 07:03 PM
            4 responses
            33 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X