Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

onExcutionUpdate with multiple filled orders

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

    onExcutionUpdate with multiple filled orders

    Hi,

    I have a doubt:

    If I am right: when I have sent an entry order to the market for more than one contract, when is filled in two times (with diferent pirces for example), the OnExecutionUpdate will detect two filled entry orders so if I have a condition that when entry order is filled I'll send an oco order, (profit and stoploss) this will be sent twice the oco order.

    So I would like to know if I can get the number of contracts filled so I can send the oco order with the same number of contracts. This way I won't have double number of contracts in the two oco orders than in my position.

    Or may be check if number of contracts in my position is the same than in my sent oco orders...

    Thanks

    #2
    Hello aprendiz,

    Thanks for your post.

    If an order gets filled in 2 executions, we will see the order fill as OrderState.PartFilled and then OrderState.Filled.

    Our SampleOnOrderUpdate strategy provides some direction for handling partial fills and changes were made to this script recently to improve functionality in this regard. I recommend reviewing this strategy and taking similar approaches in your strategy to handle stop/target submission and partial fill handling. (This is a Managed Approach strategy, but the same concepts could be implemented in an Unmanaged strategy.)

    SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    48 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X