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:	155
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:



      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.

      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.

          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:


              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:


              Please let us know if we may be of further assistance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              77 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              45 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              27 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              32 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              62 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X