protected override void OnBarUpdate()
{
// Checks to make sure we have at least 1 bar before continuing
if (CurrentBar < 1)
return;
LRLow.Set(LinReg(Low, period)[0]);
LRHi.Set(LinReg(High, period)[0]);
LRClose.Set(LinReg(Close, period)[0]);
if (Close[0] >= LinReg(High,period)[0])
{
DrawDot("tag1", true, 0, High[0] + 2 TickSize, Color.Red);
}
if (Close[0] <= LinReg(Low,period)[0])
{
DrawDot("tag2", true, 0, Low[0] - 2 TickSize, Color.Green);
}
}
An image of the code is also attached. I have looked over the {} and [] and ":" ad nauseum but can't find what I am doing wrong. Any help/advice?
sandman
Comment