OnExecutionUpdate
14.06.2020 10.46

Algorithmic Trading with NinjaTrader

Frank

wanted to ensure pls what actually is happening in this method:

? Line 789, calling a N8 method, where seems part of arguments are not just var-types but other methods, like Execution and MarketPosition.

* when saying ... (Execution execution, ... , what does it mean ? is this creating the var excution in an Execution-type, and at the same time reading all Execution data, so data can be stripped as needed ?

* If yes, is there only the last Execution data or can the data also be accessed historically from an existing array ?


? Line 793, assuming that there is the OrderState data available in execution.Order now and its used to check if OrderState-Filled or not


? Line 794 "return;" , does it mean return something to the caller of the method ? if yes, which method ?



my resource: 
* https://ninjatrader.com/support/helpGuides/nt8/onexecutionupdate.htm?zoom_highlightsub=OnExecutionUpdate
  • Yuri Zolotarev
    14.06.2020 16:31

    OnExecutionUpdate is called every time an order is filled. So just to make sure that is the case we do a check on Line 794 where we make sure that the order that NinjaTrader brings to us into this even inside the Execution object execution.Order is actually filled if it's not we simply don't let the code pass further down the track and write return.