I coded a custom indicator (based on a similar indicator) that has worked for several months but today stopped working. I've tried re-compiling the code, reloading Ninjascript, etc. to no avail.
The code is pretty simple and just marks bars that test the 21 EMA and end on/near their highs/lows. A portion of the code is below.
Can you assist?
Code:
if ((Low[0] <= EMA(Close, 21)[0])
&& (Close[0] >= EMA(Close, 21)[0])
&& ((Close[0] - Open[0]) >= 1)
&& (High[0] - Close[0] <= 0.25)
&& (Low[0] < Low[1]))
{BarBrush = UpBrush;}
if ((High[0] >= EMA(Close, 21)[0])
&& (Close[0] <= EMA(Close, 21)[0])
&& ((Open[0] - Close[0]) >= 1)
&& (Close[0] < EMA(Close, 21)[0])
&& (Close[0] - Low[0] <= 0.25)
&& (High[0] > High[1]))
{BarBrush = DownBrush;}

Comment