Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Order Entry Error

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

    ATM Order Entry Error

    Is there an option to auto close your ATM open position if price moved fast enough that your stop cant be placed because it would be under price(shorts) or over price (longs).

    Today I made a ATM breakout trade but price reversed so fast that my stop couldn't be placed and I received the ExchangeRejectCode = 2061 which left me in a naked position. Also the error codes pop up and have to be closed before I can even manually close my position which is also extremely dangerous since my position is left naked.

    Thanks

    #2
    Hello mlprice12,

    Thank you for your post.

    CRITICAL — If your inquiry involves live orders, please always reach out to your broker's Orders Desk immediately to confirm and manage your live orders and positions.

    Unfortunately, this option wouldn't be available with the default functionality of ATM Strategies but could be accomplished within a fully automated NinjaScript strategy.

    If you are not a programmer yourself, a third party vendor could assist further with creating such an item.

    I have also submitted this as a feature request to the Development Team. I will follow up with an internal tracking number for your reference as soon as it is created.

    Thanks in advance for your patience.
    Spencer F.NinjaTrader Customer Service

    Comment


      #3
      This is a critically important feature. I am very surprised there isn't a built in "kill switch" of sorts.

      In theory I could attach a strategy that would flatten all positions even if position is manually entered if error code is triggered?
      Or would flatten position need to be triggered based on other criteria?

      Comment


        #4
        Hello mlprice12,

        Thank you for your note.

        This would be possible in theory with an automated strategy as you could have it monitor for rejections and flatten the account if one is seen.

        Spencer F.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by mlprice12 View Post
          Is there an option to auto close your ATM open position if price moved fast enough that your stop cant be placed because it would be under price(shorts) or over price (longs).

          Today I made a ATM breakout trade but price reversed so fast that my stop couldn't be placed and I received the ExchangeRejectCode = 2061 which left me in a naked position. Also the error codes pop up and have to be closed before I can even manually close my position which is also extremely dangerous since my position is left naked.

          Thanks
          Hi mlprice12

          I did this strategy named 'flattenAccountIfOCORejected' to flatten your position if any of the orders in your OCO bracket is rejected. I tested it using the playback connection and it worked but you might want to test it in Sim mode next week or maybe test your breakout setup that failed using the playback connection. I'd be curious to test it too if you can send me the instrument, time of the setup and interval used along with your stop size.

          Once installed, the strategy will be placed into a sub-folder named 'TrendIsyourFriend' within the strategy folder. I have added a property you can edit named 'Tag'. This is useful to identify on which chart the strategy is running while looking at the strategy TAB window if used on multiple charts for the same instrument.

          You can look at the code here:
          This is a Ninjatrader scripting strategy to flatten all positions if any stop or target is rejected.


          N.B. you will still need to manually close the pop up window which displays the error. Also, if you need to close a position via the 'Close' button in the Chart trader panel then you'll need to click the button with the mouse wheel otherwise if you use the left button of your mouse, the strategy will get disabled. However, it is easy to re-enable if necessary within the Strategy TAB.
          Attached Files
          Last edited by trendisyourfriend; 04-10-2022, 02:42 PM.

          Comment


            #6
            Hi trendisyourfriend

            Thank you so much for your help here.

            I will test this out soon and hit you up with some feedback. Much appreciated.

            If you want to test the moment I had the issue. it was a breakout trade on the ES on april 8th at 9:40 EST. Breakout sell was set at 4479.50 with a 4 tick stop.

            Comment


              #7
              Originally posted by mlprice12 View Post
              Hi trendisyourfriend

              Thank you so much for your help here.

              I will test this out soon and hit you up with some feedback. Much appreciated.

              If you want to test the moment I had the issue. it was a breakout trade on the ES on april 8th at 9:40 EST. Breakout sell was set at 4479.50 with a 4 tick stop.
              I did test it on MES. I placed a sell stop stop market order at the blue line (4479,50) using an ATM strategy with a defined 1 tick stop loss just to be sure it would raise an error. As you can see, we got an error but the account position was flattened as can be seen by the automated Close order which was filled at 4480.75.

              Click image for larger version

Name:	FlattenPositionOnOCORejected.jpg
Views:	143
Size:	200.8 KB
ID:	1197357

              Comment


                #8
                trendisyourfriend That is awesome. Well done. Thanks so much for testing and reaching out

                Comment


                  #9
                  +1 trendisyourfriend I looked over your code very clean!

                  Comment


                    #10

                    Hello mlprice12,

                    Thanks for your patience.

                    The internal tracking number for your feature request is SFT-1910. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this feature request.

                    When a feature request is implemented, you'll find a description of the new feature in the release notes:
                    Spencer F.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by SantoshXX, Today, 03:09 AM
                    0 responses
                    11 views
                    0 likes
                    Last Post SantoshXX  
                    Started by DanielTynera, Today, 01:14 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post DanielTynera  
                    Started by yertle, 04-18-2024, 08:38 AM
                    9 responses
                    41 views
                    0 likes
                    Last Post yertle
                    by yertle
                     
                    Started by techgetgame, Yesterday, 11:42 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post techgetgame  
                    Started by sephichapdson, Yesterday, 11:36 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post sephichapdson  
                    Working...
                    X