Nine Thirty Trend

Description
Nine Thirty Trend NinjaTrader 8 indicator is a trend indicator based on the 9 EMA (Exponential Moving Average) and 30 WMA (Weighted Moving Average). It does not simply check if the EMA is above or below the WMA. There is a trend up when the 9 EMA is above the 30 WMA for at least 5 (it is a parameter, so it can be changed) consecutive bars and the distance between the EMA and WMA is at least 0.5 (it is a parameter that can be changed) of the smoothed ATR. The uptrend is valid as long as the distance between the EMA and WMA is more than 0.5 of smoothed ATR.
There is a downtrend when the 9 EMA is below the 30 WMA for at least 5 consecutive bars and the distance between the EMA and WMA is at least 0.5 of the smoothed ATR.
Parameters
Min Bars(int): Number of consecutive bars that must be above/below the ema and meet the ATR condition.
Min ATR Distance(double): Minimum distance between the EMA and WMA for a valid trend.
Plots
TrendUp (double): 1 if the trend is up (otherwise 0).
TrendDown (double): 1 if the trend is down (otherwise 0).
NoTrend (double): 1 if there is no trend (otherwise 0).
