Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

'Orphant' StopLoss order

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

    'Orphant' StopLoss order

    Here is the scenario:

    Strategy is enabled, position is long 105 shares with an active stop loss order.
    Market is closed. I have to restart NinjaTrader.
    After restart, I re-enable strategy.
    Strategy is designed to place orders equal to specified dollar amount, so it recalculated quantity amount to 106 and places adjustment order for one more share.
    Following message appears:
    "Unable to Cancel Order: Internal error, reference to IB order is missing affected Order: Sell 105 Stop @18.19"


    NinjaTrader places an additional StopLoss order for 106 shares

    Is NinjaTrader unable to pickup StopLoss order after each restart?
    Any workarounds?

    #2
    Hello michaelsh,

    Correct, you would not be able to pickup an order if you restart or disable and re-enable a strategy inside of NinjaTrader since the Strategy Position is going to be a virtual position. You would have to keep the NinjaTrader Strategy Running in order to retain the position. Here is a link to our Help Guide that goes over Strategy Position vs Account Position that you may view.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks JC,

      Since my strategy is holding positions overnight and is rarely flat, from time to time when I have to restart NinjaTrader, my strategy will be restarted, too.

      Do you think ignoring error message and manually cancelling previous StopLoss order is an adequate approach?

      Comment


        #4
        Hello michaelsh,

        After you get that message is your strategy disabled or if you go to your Strategies tab in the Control Center what color is your Strategy name in the Strategy column?
        JCNinjaTrader Customer Service

        Comment


          #5
          Afer I get the message, my strategy is still enabled

          Comment


            #6
            Hello Michaelsh,

            Thanks for confirming that.

            What you suggested before should work if you would like to sync them up manually.

            Otherwise, you may look into syncing account positions by changing the Strategy settings. Here is a link to our Help Guide that goes over the different options.
            JCNinjaTrader Customer Service

            Comment


              #7
              JC,

              Actually, I would prefer to sync strategy automatically, if possible.
              However, this leads to the situation with additional StopLoss order is placed (see my first post).

              Can you suggest any solution, other than manually cancelling previous StopLoss?

              - Michael

              Comment


                #8
                Hello Michael,

                Setting the "Sync account position" to true it will automatically sync the strategy and account positions but it may have to submit orders to the Account in order to achieve this for you as stated in the Help Guide.

                Note that you may try to use the unsupported Account object to introduce a few checks in your system if you do not wish to use the "Sync account position" property but it would be unsupported by us.Here is a link to a thread that goes over this a little bit.

                JCNinjaTrader Customer Service

                Comment


                  #9
                  JC,

                  As I have mentioned, I am using "Sync account position" property set to true.
                  Do I still have to use unsupported methods to avoid duplicate StopLoss order?
                  If yes, will syncing Account positions to strategy Position in the link you provided restore reference to stoploss?

                  Comment


                    #10
                    Hello Michael,

                    I believe we maybe getting off track. When you re-enable your strategy it will check for any active orders previously generated by the strategy on your account and cancel those first. Should the strategy be unable to cancel and receive confirmation on the cancellation of these orders within 40 seconds the strategy will not start and an alert will be issued.

                    You can opt to "Cancel exit orders when a strategy is disabled" that will automatically cancel the orders when you restart NinjaTrader then when you re-enable your strategy to submit the stoploss order. Note that your strategy will be unprotected in-between restarts but it will ensure that your stoploss is canceled out so there is not two orders.

                    Let me know if you have any further questions.
                    JCNinjaTrader Customer Service

                    Comment


                      #11
                      Thank you, JC.
                      I will just set "Cancel exit orders when a strategy is disabled" since I plan to restart when market is closed anyway

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Segwin, 05-07-2018, 02:15 PM
                      14 responses
                      1,788 views
                      0 likes
                      Last Post aligator  
                      Started by Jimmyk, 01-26-2018, 05:19 AM
                      6 responses
                      837 views
                      0 likes
                      Last Post emuns
                      by emuns
                       
                      Started by jxs_xrj, 01-12-2020, 09:49 AM
                      6 responses
                      3,293 views
                      1 like
                      Last Post jgualdronc  
                      Started by Touch-Ups, Today, 10:36 AM
                      0 responses
                      13 views
                      0 likes
                      Last Post Touch-Ups  
                      Started by geddyisodin, 04-25-2024, 05:20 AM
                      11 responses
                      63 views
                      0 likes
                      Last Post halgo_boulder  
                      Working...
                      X