Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

internal order handling rule managed approach

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

    internal order handling rule managed approach

    Hello,
    I do not understand that rule. I have a long position opened and want to change the setstoploss order so then I get this error. Maybe there is a missunderstanding from my side ?
    The setstopplos is initial set in State.Configure and it will be changed in OnBarUpdate ? What to do to find the real reason for that?
    thx
    regards
    Attached Files

    #2
    the event was 09.04.2021 03:21:04

    and it happens once a day ,in the most cases it works ...
    Last edited by hansg1; 04-09-2021, 01:45 AM.

    Comment


      #3
      Hello hansg1,

      Thank you for your post.

      In the image you shared, 'active' means that the order is not filled yet or canceled.

      As stated in the Tips section of the SetStopLoss help guide documentation, y​​​​​ou may call the SetStopLoss() method from within the strategy OnBarUpdate() method should you wish to dynamically change the stop loss price while in an open position.

      Should you call this method to dynamically change the stop loss price in the strategy OnBarUpdate() method, you should always reset the stop loss price / offset value when your strategy is flat otherwise, the last price/offset value set will be used to generate your stop loss order on your next open position

      See the example script in the help guide documentation below for an example of modifying the price of stop loss and profit target orders.
      SamplePriceModification - https://ninjatrader.com/support/help...of_stop_lo.htm

      Also, see the Notes and Tips sections of this help guide documentation regarding SetStopLoss() - https://ninjatrader.com/support/help...etstoploss.htm

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

      Comment


        #4
        Hi Brandon,
        thx for your reply
        could you have a look please in the grid?
        I do not understand what happens before the event

        Strategy 'EMa101b1/226153922': An Set() method to submit an exit order at '09.04.2021 03:21:04' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.

        the execution happens in the chart above , but why is the "ignored" after that. As I said the logic is working in most cases. So it is not a systematical error.
        There are some orders bevore "ignored".Could you please explain? Thx
        regards

        Click image for larger version

Name:	grid1.PNG
Views:	204
Size:	78.6 KB
ID:	1150829

        Comment


          #5
          Hello hansg1,

          Thank you for your note.

          This error message means that something in your script is violating one of the Set() method Internal Order Handling rules located in the Managed Approach help guide page.

          You would need to debug your script and compare your strategy's logic to the Internal Order Handling rules to determine where in your script the error is occurring.

          See this help guide link regarding the Managed Approach Internal Order Handling rules - https://ninjatrader.com/support/help...antedPositions

          Below is a link to a forum post that demonstrates using prints to understand the behavior of a strategy.
          https://ninjatrader.com/support/foru...121#post791121

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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          148 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Working...
          X