Here is some of the problematic code:
protected override void OnBarUpdate()
{
if (CurrentBars[0] < 10)
return;
double fiveMinEma = EMA(BarsArray[2],21)[0];
if (Close[0] < fiveMinEma && Close[1] >= fiveMinEma)
{
placeLong = true;
}
if (Close[0] > fiveMinEma && Close[1]<= fiveMinEma)
{
placeShort=true;
}
If (IsFirstTickOfBar);
{
if (placeLong())
{
if (!IsOrderActive())
{
orderEntryPrice = High[1] + 1*TickSize;
// Place the limit order
EnterLongLimit(DefaultQuantity,orderEntryPrice, "Long Entry");
getting error at IsFirstTickOfBar line

Comment