I'm a novice programmer, so forgive me if this is something obvious. I've checked all the braces and find matching pairs in all cases here. The code compiles fine without this snippet. Any ideas?
protected bool Bullish(int ConsecutiveBullishBars)
{
private int howmanybars = ConsecutiveBullishBars - 1;
private bool IsMarketBullish = false;
while (howmanybars >= 0)
{
if (Close[howmanybars] > KeltnerChannel(Offset, Period)[howmanybars])
{
IsMarketBullish = true;
}
else
{
IsMarketBullish = false;
}
howmanybars--;
}
return IsMarketBullish;
}
Here is the full code: http://pastebin.com/aHbzqKbw