Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change TimeInForce with SubmitOrder

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

    Change TimeInForce with SubmitOrder

    Hi,
    I have 2 questions:
    1. I'm using unmanaged mode to send orders, and it is said that i should use SubmitOrder.

    However, the submit order doesn't seem to allow me to set the TimeInForce parameter. I've read somewhere in the forum that we can set the TimeInForce parameter prior to sending orders like so:

    Code:
    TimeInForce = Cbi.TimeInForce.Day;
    orderObject = SubmitOrder(barsInProgressIndex, orderAction, orderType, quantity, limitPrice, stopPrice,  ocoId, signalName);
    So is this the correct/recommended method?

    2. It seems I'm allowed to put in odd lot orders, and orders can be partially filled with odd lot sizes too. Is there a way to change this behavior?

    Thanks,

    Budi

    #2
    Budi, correct that should do it, however you want to move your TimeInForce setting to the Initialize() method - http://www.ninjatrader.com/support/h...imeinforce.htm

    This is also correct, if you don't want partials in simulation just set to 'Enforce Immediate Fills' under Tools > Options > Simuator.

    Comment


      #3
      Hi, thanks for the reply. I will move the code to Initialize() as you suggested.

      On the partial order issue, I still want the simulator to be partially filling my orders, but I do not want them to fill it with odd sizes. Is is possible?

      I'm pretty new with the actual trading stuff, so I'm not sure if this is even possible/a common practice.

      Thanks,
      Budi

      Comment


        #4
        Unfortunately you could not control how you see the partials materializing, basically the same as trading live, partials can and do occur (depending on market, order and available liquidity).

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        649 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        576 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X