I removed my stops from onexecution since they were not working some times. In onBarupdate they work every trade. OK.
But I also dont have my variables from onExecution working. eg entrylevel always shows 0 in my output window.
if(entryOrderSAa == execution.Order)
{
if(execution.Order.OrderState == OrderState.Filled)
{
// SetStopLoss("SAa", CalculationMode.Price, stop1, false); SetProfitTarget("SAa", CalculationMode.Price, startt1);
entrylevel = levS;
profittargetSAa = t1real;
}
}
What is wrong with this code, as it looks same as samples I have from the forum.
Thank you!
Tony
Comment