I am new to Ninja Trader and am trying my hand at building some simple indicators. I am trying to change the color of a bar based on certain conditions. I am attaching a copy of my Script below. The script compiles with no errors. When I load the indicator on to a chart, none of the bars are coloured even though I can see quite a few with the conditions that I am looking for. In the log tab, I can see "Its done!!" being printed multiple times.
What am i missing?
Thanks and I apologise for the trouble.
Part of my code:
//Add your custom indicator logic here.
if (CurrentBar < 1)
return;
// condition: and(C > O, C[-1] < O[-1], O > C[-1], C > O[-1])
if (Close[0] > Open[0] && Close[1] < Open[1] && Open[0] > Close[1] && Close[0] > Open[1])
{
PlotBrushes[0][0] = Brushes.Green; //
}
Print("its done!!");

Comment