In the spirit of sharing, Here is the Ninja code of Anek's paint bars. I coded it for myself and its exactly what he has discussed.
Once you have created an empty indicator and make sure it calculates on barclose, just copy and paste this.
I am also attaching the end of NQ day 1500 Volume bars today as reference.
cheers.
SS
protected override void OnBarUpdate()
{
if(CurrentBar < 2)
return;
if (Close[0] == Open[0])
BarColor = Color.Yellow;
else if (Close[0] > High[1])
BarColor = Color.DarkSeaGreen;
else if (Close[0] < Low[1])
BarColor = Color.Red;
else if (Close[0] > Open[0])
BarColor = Color.DarkGreen;
else if (Close[0] < Open[0])
BarColor = Color.Maroon;
}
here is the sample attached at the bottom.
Once you have created an empty indicator and make sure it calculates on barclose, just copy and paste this.
I am also attaching the end of NQ day 1500 Volume bars today as reference.
cheers.
SS
protected override void OnBarUpdate()
{
if(CurrentBar < 2)
return;
if (Close[0] == Open[0])
BarColor = Color.Yellow;
else if (Close[0] > High[1])
BarColor = Color.DarkSeaGreen;
else if (Close[0] < Low[1])
BarColor = Color.Red;
else if (Close[0] > Open[0])
BarColor = Color.DarkGreen;
else if (Close[0] < Open[0])
BarColor = Color.Maroon;
}
here is the sample attached at the bottom.