I am using the following code:
protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
TraceOrders = true;
Add("XLF", PeriodType.Minute, 5);
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
if (BarsInProgress == 1)
{
if(High[0]>10.9)
EnterShort(0, 1, "Short");
if(Low[0]<-10.6)
EnterLong(0, 1, "Long");
}
}

Comment