private int loopBack =10;
if (BarsInProgress > 20)
{
if (Position.MarketPosition == MarketPosition.Flat)
{
for(int barsMin = 0, barsMax = lookBack; barsMin < barsMax; barsMin ++)
{
if (LinRegSlope1[barsMin] > LinRegSlope1[barsMin + 1])
Count = Count +1;
Print("Count: " + Count);
}
}
}
if ( Count > 3) LinRegSlopeRising = true; else LinRegSlopeRising = false;
Comment