This is my 1st Ninja script here and I need some help. I used script from ColoredScalpBar8 and replaced its indicator logic with current one.
The idea is simple. I want to paint the bars with the same color as long as they stay in the same trend. The trend is defined as below:
double close0 = Close[0];
double SMA1 = SMA(Close, 6)[1];
double ATR1 = ATR(6)[1];
if (close0 > (SMA1 - atrPercent*ATR1))
{BarBrush = UpBrush;}
else
{BarBrush = DownBrush;}
But it did not compile well and I attached screenshot here. I could not figure out why "UpBrush" and "DownBrush" were declared fine in ColoredScalpBar8 but not in my script.
Would really appreciate some help. Since there are compiling errors, I don't know how to export the script. Hence the screenshot only.
Comment