• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with orders working with Calculate.OnPriceChange

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

    Problems with orders working with Calculate.OnPriceChange

    Hello. I create an strategy:
    It works calculating OnPriceChange,
    applied to a range bars chart, with ES futures .
    I have problems with orders.
    when I am short, for example, if appears the condition to enter long position,
    depending on the Close[0] position related to the entry price,
    I send EnterLongLimit(1, epc) or EnterLong(1).

    When is sent the order EnterLong(1),
    I hope that this order closes the short position and open a long position ( entering at market), but it doesn´t occur in many bars.
    The same with long positions, EnterShort(1) order doesn't work as it should.

    ¿Why doesn't work this EnterLong(1) or EnterShort(1) orders when Close[0] is in a level to enter at market?

    I sent the strategy code with clear explanations for entries and exit conditions and price levels to summit different orders.

    Hoping for your answer , thanks a lot.

    Attached Files

    #2
    I send an image showing the problem
    Attached Files

    Comment


      #3
      again Click image for larger version

Name:	directionMerrors.PNG
Views:	31
Size:	32.5 KB
ID:	1088334
      Attached Files

      Comment


        #4
        Hello Parmenides48,

        Thanks for your message.

        Please be sure to rule the Internal Rules of the Managed Approach. Stop and Limit orders that are submitted to exit a position will be ignored if an entry order is placed in the opposite direction.

        We would recommend adding prints to your code to verify your strategy logic is becoming true and allowing these order methods to be reached.

        We also recommend testing the strategy with TraceOrders enabled so you can confirm the order methods are submitting the orders, receiving valid parameters, and are not being ignored due to an internal rule.

        Managed Approach Internal Rules - https://ninjatrader.com/support/help...antedPositions

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

        Trace Orders - https://ninjatrader.com/support/help...aceorders2.htm

        We look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #5
          thanks for your answer,
          I am working on your recomendations.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by U0000999, Today, 05:44 AM
          0 responses
          1 view
          0 likes
          Last Post U0000999  
          Started by lakman184, Today, 05:41 AM
          0 responses
          5 views
          0 likes
          Last Post lakman184  
          Started by lilupwab, Today, 04:50 AM
          0 responses
          4 views
          0 likes
          Last Post lilupwab  
          Started by MarkFrench1991, Today, 03:47 AM
          0 responses
          9 views
          0 likes
          Last Post MarkFrench1991  
          Started by EddyEd, Today, 03:47 AM
          0 responses
          7 views
          0 likes
          Last Post EddyEd
          by EddyEd
           
          Working...
          X