Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SubmitOrderUnmanaged -------OrderType.MIT not working

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

    SubmitOrderUnmanaged -------OrderType.MIT not working

    OrderType.MIT not working for me.
    i expect that when the condition = true ---> send the MIT order at High[0] or Low[0]

    but the thing is once i send the MIT order, the order will just filled right at the next sec.


    in the picture attached, the condition isLong=True. the MIT order shoud be right at the pp(the golden line)
    but it just fill at next order.



    I am not sure what is wrong here

    -----------------------------------------------------------------------------------------------------------------------------


    if (isLong)
    {
    _entryOrder = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.MIT, posSize,0,
    High[0]+(RSI_Tick*0.25),"", EnterLongName);

    }
    if (!isLong)
    {
    _entryOrder = SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.MIT, posSize, 0,
    Low[0]-(RSI_Tick*0.25),"", EnterShortName);

    }
    ----------------------------------------------------------------------------------------------------------------------

    #2
    Hello code77995,

    Thanks for your post.

    To understand why the script is behaving as it is, such as placing orders or not placing orders when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

    In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121

    See the attached example script that demonstrates submitting a Buy MIT order and a Sell MIT order using the Unmanaged Approach. Once the MIT orders are submitted, they will fill once the market price touched the price of the MIT orders.

    Let us know if we may assist further.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    626 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    562 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    567 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X