I don't know if someone has problems with their strategies with all these beta changes but mine is not working anymore and I can't put my finger on the problem...
I have really weird results like buying selling on the first bar of session when the code makes that impossible. I would like to know where changes occured in NT7 to make this code not work anymore.
I am using two time frame : 1 minute to buy and sell and 50 ticks to monitor stops so I am using BarInprogress in my code ( 0 = 1 minute; 1= 50 ticks).
I am also using Token in my order management. So let me show you part of my stop management rules :
protected override void OnExecution(IExecution execution)
{
if (entryBOrder1 != null && entryBOrder1.Token == execution.Order.Token)
{
if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
{
stopSOrder1 = ExitLongStop(1, true, execution.Order.Filled, execution.Order.AvgFillPrice - (stopLoss * TickSize), "MyStop4","TV1 aL");
targetBOrder1 = ExitLongLimit(1, true, execution.Order.Filled, execution.Order.AvgFillPrice + (firstTarget_Ticks * TickSize), "MyLTarget1","TV1 aL");
if (execution.Order.OrderState != OrderState.PartFilled)
{
entryBOrder1 = null;
BuyPosition1 = true;
BuyPosition1AvgPrice = execution.Order.AvgFillPrice;
}
}
}
if ((stopSOrder1 != null && stopSOrder1.Token == execution.Order.Token) || (targetBOrder1 != null && targetBOrder1.Token == execution.Order.Token)|| (timeSOrder1 != null && timeSOrder1.Token == execution.Order.Token))
{
if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled)
{
timeSOrder1 = null;
stopSOrder1 = null;
targetBOrder1 = null;
BuyPosition1 = false;
}
}
I know that token is not good anymore. Could that be the problem ?
Should I change my code if yes what would be the new order syntax without token ?
Has BarInProgress method been modified ?
Sorry but I am a bit lost with all the beta changes and need some clues to resolve this.
Thanks

Comment