Here is the code:
====================
protected override void OnBarUpdate()
{
//Are there enough bars
//if (CurrentBar < Period) return;
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (Close[0] > Open[0] && Close[0] > High[1])
{
BarColor = Color.Blue;
}
else if (Close[0] < Open[0] && Close[0] < Low[1])
{
BarColor = Color.Red;
}
else if (Close[0] >= Low[1] && Close[0] <= High[1])
{
BarColor = Color.Black;
}
}
===============
end
thanks!!!
Comment