Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MIT Orders filled immediately

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

    MIT Orders filled immediately

    Hello, I was wondering why are my MIT orders filled immediately rather than when the price reaches the StopPrice I am setting?

    Code:
    SetStopLoss("long_signal", CalculationMode.Price, current_SL, false);
    SetProfitTarget("long_signal", CalculationMode.Price, current_TP, true);
    __entry_long_order = EnterLongMIT( 0, true, __quantity, long_price, "long_signal");


    Click image for larger version

Name:	image.png
Views:	81
Size:	28.4 KB
ID:	1222022

    #2
    Is this may be the normal behavior for MIT orders?
    I was under the impression the order would get filled only after Touching the given price.
    MIT = Market If Touched, right?

    puzzled about this

    Comment


      #3
      Hello Keith,

      Thank you for your post.

      If your strategy is ever resulting in unexpected behavior, I recommend adding prints to debug and further understand what is occurring. For more information about using print statements to debug your code:
      https://ninjatrader.com/support/foru...ing#post791121


      For example, you could add a print similar to the following both outside of the condition as well as inside of the condition that triggers your long entry:

      Code:
      Print(string.Format("{0} Quantity: {1} Long Price: {2} Long Signal: {3} Current Price: {4}", Time[0], __quantity, long_price, long_signal, Close[0]));
      For the print inside of the conditions where the order would be submitted, you could even add "MIT Submitted" or something just to be able to distinguish when it is triggered when reviewing the prints in the NinjaScript Output window.

      Please let us know if we may be of further assistance.
      Emily C.NinjaTrader Customer Service

      Comment


        #4
        Hi Emily thanks for your response. Yes, I am using not just simple Print loging but I am aso loging to a file, and I also attach the process to the Ninjatrader EXE binary and debug it as it happens. Still: I am unable to figure out why on earth is the MIT order filled immediately after being sent and clearly very far away from the Stop Price?

        I forgot to mention: I am using a Playback connection, I have downloaded the playback data with the Kinetic End of Day connection, then replayed it with the playback data connection. Is that somehow related to this issue?

        Thanks again.

        Comment


          #5
          Hello belzegor,

          Thank you for your reply.

          I do not suspect that this is related to using the Playback connection. Please review your strategy and make sure that orders are being submitted to the correct side of the market; for example, Buy MIT orders and Buy Limit orders should go below the current market price, and Sell MIT/Sell Limit orders should go above the current market price. If you submit an MIT order to the other side of the market, it is possible that this would result in a seemingly immediate fill.

          Please let us know if we may be of further assistance.
          Emily C.NinjaTrader Customer Service

          Comment


            #6
            So there is no way to set a price above the current price for a BUY MIT? I want the order to be filled only if the Price touches the value I am sending.
            I need to implement something like that manually rather than with a MIT order if needed be?

            Comment


              #7
              Hello belzegor,

              Thank you for your reply.

              The different order types are explained here:
              https://ninjatrader.com/support/help...rder_types.htm

              If you are looking to place a buy order that is filled if the price touches the value, and have that buy order above the current market price, it sounds like you would need to use a Buy Stop order using EnterLongStopMarket:
              https://ninjatrader.com/support/help...stopmarket.htm

              Please let us know if we may be of further assistance.
              Emily C.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by orestejr, Today, 11:58 AM
              0 responses
              6 views
              0 likes
              Last Post orestejr  
              Started by nickslad, Today, 09:58 AM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_ChristopherJ  
              Started by tradgrad, Today, 11:36 AM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_Emily  
              Started by patdmoney, Today, 10:55 AM
              3 responses
              18 views
              0 likes
              Last Post NinjaTrader_Emily  
              Started by SteveReiza, Today, 10:59 AM
              2 responses
              21 views
              0 likes
              Last Post SteveReiza  
              Working...
              X