Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

one order is divided into multiple executions

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

    one order is divided into multiple executions

    Hi

    at some point I issue an entry order (can be long or short)

    EnterLongStopLimit(1,true,2,HighOfRange + 2*TickSize,HighOfRange + 2*TickSize,"MyLongEntry");

    I need it to be ASAP but not market. and close to the trigger. so I use a stop limit.

    I can see it in trace. I see the line like :

    11/8/2017 10:19:15 AM Strategy 'MW7/120585512': Entered internal SubmitOrderManaged() method at 11/8/2017 10:19:15 AM: BarsInProgress=1 Action=Buy OrderType=StopLimit Quantity=2 LimitPrice=13413 StopPrice=13413 SignalName='MyLongEntry' FromEntrySignal=''

    when I run it on historical data all is ok.
    when its live data or even Playback, I sometimes (not always) get several entry points instead of the Quantity I ordered. for example above I can get two entries, each with Qty1. in total its 2. and when I exit the position, obviously I get two exits.

    what can be the reason ?

    #2
    Hello dadarara,

    Thanks for opening the thread.

    It sounds like you are getting a partial fill on that order in which it partially gets filled for one contract and then partially filled for another contract.

    You can check this by placing a print in OnOrderUpdate() to see the update of each order in your strategy.

    Code:
    protected override void OnOrderUpdate(Cbi.Order order, double limitPrice, double stopPrice, 
    			int quantity, int filled, double averageFillPrice, 
    			Cbi.OrderState orderState, DateTime time, Cbi.ErrorCode error, string comment)
    		{
    			Print(order.ToString());
    		}
    OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm

    Partial fills are normal and can be expected when using limit and stop limit orders.

    If you have any additional questions, please don't hesitate to write back.

    Comment


      #3
      hi

      normal even if its not a live trading. the orders are not really executed at the broker side?
      and in the Playback mode?

      Comment


        #4
        Hello dadarara,

        Thanks for your additional question.

        Only orders submitted with your live account get filled by the broker/exchange. When you are not trading with your live account, orders are filled by the Simulator. These orders are filled locally and mimic that of the broker/exchange. This would also mean that the Playback connection and Sim101 accounts will all have their orders filled by the Simulator.

        Additional reading on the Simulator can be found here: https://ninjatrader.com/support/help...simulation.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        70 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        143 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        76 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        47 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        51 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X