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

ExitLongLimit

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

    ExitLongLimit

    I have a strategy that enters a long trade via EnterLongStopLimit. When the trade is filled, I set an exit target with ExitLongLimit in OnExecutionUpdate. However the call is rejected with "An Exit() method to submit an entry order at '1/10/2019 10:51:00 AM' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation"

    I'm using limit orders for entry and targets because I want to enter and take profit at defined levels. How else can I achieve this if I cannot exit with ExitLongLimit?

    thanks


    #2
    Hello pman777,

    Thank you for the post.

    The message you are seeing is related to the specific order handling rules with the managed approach. Do you currently have either of the notes listed in the following page occurring within the script?


    Methods that generate orders to exit a position will be ignored if:

    • A position is open and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
    • A position is open and an order submitted by a set method (SetStopLoss() for example) is active
    If you run into a situation where the internal handling rules prevent you from doing what you want, that would be a case where switching to the unmanaged approach would be necessary.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      thanks. Can I have a mix of managed and unmanaged calls within the dame strategy?

      Comment


        #4
        Hello pman777,

        Unfortunately not, you would need to use one or the other as they have different specifications about how they operate. This is a script property which you set that enables either managed or unmanaged trading.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          ok ... more work to do. thanks!

          Comment


            #6
            One more question ... if I issue an unmanaged limit order from my strategy that is "working", but the strategy aborts for some reason before it is filled, is the order is still active at the exchange? I currently issue my stop order when the limit order is filled as that is the only time I can calculate it. But I also don't want to be in a position where I have an active unfilled order at the exchange with no stop if my pro\gram fails mid-stream.

            Comment


              #7
              Hello pman777,

              That depends on the order handling settings that you have set for the strategy, if you have the option to cancel Entry and Exit orders checked in the options menu they should be canceled if the strategy is disabled. If they are unchecked they would still be active at the exchange and you would need to manage the orders.



              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Perfect ... thanks Jesse!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NRITV, Today, 01:15 PM
                2 responses
                8 views
                0 likes
                Last Post NRITV
                by NRITV
                 
                Started by frankthearm, Today, 09:08 AM
                7 responses
                31 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by maybeimnotrader, Yesterday, 05:46 PM
                5 responses
                26 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by quantismo, Yesterday, 05:13 PM
                2 responses
                19 views
                0 likes
                Last Post quantismo  
                Started by adeelshahzad, Today, 03:54 AM
                5 responses
                33 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X