In the Initialize section I add a 1 minute time frame and have CalculateOnBarClose = false because I then use FirstTickOfBar in the OnBarUpdate section.
Then I use if(BarsInProgress == 0) in the onBarUpdate section along with this entry order: entryOrder = EnterLongStop(1, false, 30000, Math.Max((Close[0]+(5*TickSize)),GetCurrentAsk(0)),"LongEntry");
I have this set to false because I want the code to check each bar whether to resubmit the order or not.
In the onExecution section the stop order is: stopOrder = ExitLongStop(1, true, execution.Order.Filled, execution.Order.AvgFillPrice - (StopPips*TickSize), "LongStop", "LongEntry");
The problem I now have is that this code will not produce any orders. Without trying to add the extra time series the code works fine. Any ideas as to where I am going wrong? Thanks!
GT

Comment