I´m having issues again with onExecution. As I had in NT7 I plot the entryprice and calculated targets in the chart (instead of output window) to see if its OK. I have - referring to the NT-sample "OnOrderUpdate" in Onexecution:
protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
{
if (entryOrderS1a != null && entryOrderS1a == execution.Order)
{
if (execution.Order.OrderState == OrderState.Filled)
{avgFillSa=execution.Order.AverageFillPrice;
target1short=avgFillSa-ts1*TickSize;
target2short=avgFillSa-ts2*TickSize;}
}
but when entry is triggered the avgFillSa, target1short and target2short are always "0".
Thank you!
Tony
Comment