• 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

RE: Using OnOrderUpdate() and OnExecution() methods to submit protective orders

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

    RE: Using OnOrderUpdate() and OnExecution() methods to submit protective orders

    Hi,

    I am referring to Stop orders to exit positions found in this thread: https://ninjatrader.com/support/foru...ead.php?t=7499

    Are exit stop orders disclosed to the exchange ? I mean are they shown to the public / my broker ? Or are they hidden?

    Tnx

    #2
    Hello YakusaTrader,
    Thanks for your post.

    The exit orders on that page will mostly be seen at the exchange with the exception of the MIT order type. Please see the following link for more information on MIT orders.

    https://ninjatrader.com/blog/hide-or...ed-orders-mit/

    We also support simulated stop orders. These orders remain in NinjaTrader until certain conditions are met - only then the orders will be submitted to the broker/exchange. Please see the link below for more information regarding simulated stop orders.

    https://ninjatrader.com/support/help...top_orders.htm
    JoshNinjaTrader Customer Service

    Comment


      #3
      Tnx for your prompt response. I used simulated stop orders in the past and they don't get triggered all the time.
      Protective orders are working better for me so far.
      I just want to make sure, if I use protective orders https://ninjatrader.com/support/foru...ead.php?t=7499
      along with MIT (attached picture). Would these protective orders still be seen at the exchange?
      Attached Files

      Comment


        #4
        If you are referring to ExitShortMIT() or ExitLongMIT() than those orders would not be seen at the exchange. Your specific broker would have more information on how/if they manage MIT orders.

        https://ninjatrader.com/blog/hide-or...ed-orders-mit/
        JoshNinjaTrader Customer Service

        Comment


          #5
          Do you have any information on NinjaTrader brokerage? If not, who should I contact ?

          Comment


            #6
            For NinjaTrader Brokerage MIT orders would be active on the Continuum servers but not at the exchange.

            https://ninjatrader.com/support/help...rs_reside_.htm

            For more information on NinjaTrader Brokerage you can reach out to BrokerageSupport(AT)NinjaTrader(DOT)com
            JoshNinjaTrader Customer Service

            Comment


              #7
              Tnx.

              I tried ExitLongMIT() in the protective orders sample and it didn't work.

              https://ninjatrader.com/support/foru...ead.php?t=7499

              I replaced ExitLongStopMarket by ExitLongMIT. I left Stop price the same. It's a variable from order update.

              Does ExitLongMIT. work on OnExecutionUpdate?

              Comment


                #8
                You can submit any of those order types from OnExecutionUpdate().

                MIT orders are similar to a stop order except the buy and sell actions are reversed. For example, a buy MIT order is submitted below market where a buy Stop would be submitted above market. Likely your order was rejected.

                You can confirm this by using TraceOrders. Please see the following links for more information on TraceOrders.

                Strategy Property- TraceOrders
                Tips - How to use TraceOrders
                JoshNinjaTrader Customer Service

                Comment


                  #9
                  I don't think my order was rejected. I was able to trace the order. It closed right away after it was opened.
                  From tracing the orders, MIT order Stop price seems to be correct from my script.

                  7/31/2018 5:23:00 PM Strategy 'Test/-1': Entered internal SubmitOrderManaged() method at 7/31/2018 5:23:00 PM: BarsInProgress=0 Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='MyEntry' FromEntrySignal=''
                  7/31/2018 5:23:00 PM Strategy 'Test/-1': Entered internal SubmitOrderManaged() method at 7/31/2018 5:23:00 PM: BarsInProgress=0 Action=Sell OrderType=MIT Quantity=1 LimitPrice=0 StopPrice=7286.50 SignalName='MyStop' FromEntrySignal='MyEntry'
                  7/31/2018 5:23:00 PM Strategy 'Test/-1': Entered internal SubmitOrderManaged() method at 7/31/2018 5:23:00 PM: BarsInProgress=0 Action=Sell OrderType=Limit Quantity=1 LimitPrice=7289.50 StopPrice=0 SignalName='MyTarget' FromEntrySignal='MyEntry'
                  7/31/2018 5:23:01 PM Strategy 'Test/-1: Cancelled pending exit order, since associated position is closed, orderId='NT-00002-3916' account='Backtest' name='MyTarget' orderState=Working instrument='NQ 09-18' orderAction=Sell orderType='Limit' limitPrice=7289.5 stopPrice=0 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2018-07-31 17:23:00' gtd='2099-12-01' statementDate='2018-09-17'

                  This is trade #1 in the attached picture.
                  I don't understand what makes the open Long trade close right away.
                  This behavior doesn't happen with ExitLongStopMarket.
                  Attached Files

                  Comment


                    #10
                    The price for ExitLongMIT() should be above the market and it appears as if you have it set as your stoploss below the market. Please see the following public link for more information on MIT orders.

                    https://www.investopedia.com/terms/m...tiftouched.asp
                    JoshNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by fluffier, Yesterday, 11:49 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post fluffier  
                    Started by GARZONJ, Yesterday, 09:02 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post GARZONJ
                    by GARZONJ
                     
                    Started by bouncetherubble, Yesterday, 08:42 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post bouncetherubble  
                    Started by connorgrant5, Yesterday, 01:33 PM
                    1 response
                    15 views
                    0 likes
                    Last Post NinjaTrader_ShawnB  
                    Started by Mykro, Yesterday, 01:28 PM
                    7 responses
                    17 views
                    0 likes
                    Last Post Mykro
                    by Mykro
                     
                    Working...
                    X