fh: OnExecutionUpdate
07.06.2020 15.03

Algorithmic Trading with NinjaTrader

Frank

rt now not yet understanding the method in its entirety. 4exmpl:

? Is this a mthod that is called after the order is filled ?

? how and weher are the OnExecutionUpdate overloads affecting the process ?

? Line 543, what does it mean exactly ?




  • Yuri Zolotarev
    07.06.2020 17:52

    Please use FULL words to write your message!!! If you are in a hurry to write this up properly why should anyone take their time to prepare a proper answer for you. 

    ?1) Is this a method that is called after the order is filled ? -> yes it is but to make sure we also do an extra check up 

    if (execution.Order.OrderState != OrderState.Filled) return;

    ?2) ? how and where are the OnExecutionUpdate overloads affecting the process ? - it is not clear what you are trying to ask here

    ?3) Line 543 makes sure that the order filled does NOT have a name EnterLongName or EnterShortName,


  • Frank
    07.06.2020 18:29

    thx for reply

    not sure about this point yet, for the OnExecutionUpdate, is it reading the strategy's order and will execute that order ?

    or is it reading the order being placed on the market and keeps updating the strategie if and how the execution still is not processed ?

    or soething else ?

  • Yuri Zolotarev
    07.06.2020 19:29

    No it is an event, so when an order is filled this event handler get called and you have an opportunity to do stuff like set your stops for instance.