Consecutive Above MA

Description
The Consecutive Above Moving Average (MA) indicator for NinjaTrader 8 is a custom indicator designed to calculate the number of consecutive closing prices that have been above a specified moving average. It provides traders with valuable insights into the strength and duration of a bullish trend.
This indicator offers flexibility by allowing you to choose between three types of moving averages: Exponential Moving Average (EMA), Double Exponential Moving Average (DEMA), and Simple Moving Average (SMA). Each moving average type has its own characteristics and may be suited to different trading strategies.
In addition to selecting the moving average type, you can also customize the calculation value used by the indicator. By default, the indicator uses the closing price, but you have the option to choose other values such as the low of the bar or even another indicator.
The main purpose of this indicator is to identify and quantify the consecutive number of closes that remain above the chosen moving average. This information can be helpful in confirming the strength of a bullish trend and potentially determining when the trend may be losing momentum or reversing.
By utilizing the Consecutive Above MA indicator, traders can make more informed decisions about entry and exit points in the market. It helps to identify situations where a stock or other trading instrument has shown sustained strength by closing consecutively above the moving average, indicating a potential bullish trend.
Overall, this custom indicator provides traders with a valuable tool for trend analysis and helps them gauge the strength and duration of bullish moves based on consecutive closes above a selected moving average.
Parameters
Period (int): Number of bars used in the calculation.
Moving Average Type (TdjMovingAverageProperties.MovingAverageType): Type of the moving average used in the calculation. There are three options: EMA (Exponential Moving Average), DEMA (Double Exponential Moving Average), and SMA (Simple Moving Average).
Plots
Value (double): the result of the calculation.
