Imbalance Trend

Description
The Imbalance Trend indicator is a powerful tool designed for use in NinjaTrader 8, crafted to assist traders in identifying and capitalizing on potential market trends by analyzing imbalances between price levels. It operates on a simple yet effective principle: When there is an imbalance to the upside, signaled by the current low price being higher than the price two periods ago, it suggests the initiation of an upward trend. Conversely, when there is an imbalance to the downside, indicated by the current high price being lower than the price two periods ago, it suggests the commencement of a downward trend. These imbalances offer valuable insights into potential trend changes, aiding traders in making well-informed decisions.
Importantly, the identified trend, whether upward or downward, remains valid until a reversal imbalance is formed in the opposite direction. In other words, when an upward trend is established, it remains in effect until a clear imbalance to the downside is detected. Conversely, a downward trend persists until a noticeable imbalance to the upside is observed. This dynamic aspect of the indicator helps traders stay aligned with the prevailing market sentiment and adapt to changing market conditions, enhancing the accuracy of their trading strategies.
The Imbalance Trend indicator empowers traders with a straightforward yet effective tool for trend analysis, providing clarity on trend direction and potential reversals. By incorporating the concept of trend validity, it equips traders with the necessary information to make timely and informed trading decisions in the ever-changing financial markets.
Parameters
Imbalance Min Ticks (int): This parameter defines the minimum number of ticks that must separate the low of the current bar from the high of the bar two periods ago (for upward imbalances) or the high of the current bar from the low of the bar two periods ago (for downward imbalances) to qualify as an imbalance. If this gap is smaller than the specified number of ticks, it is not considered an imbalance.
Imbalance Min ATR Multiple (double): You can set this parameter to a multiple of the Average True Range (ATR). The indicator uses this multiple to dynamically determine the minimum gap size required to identify an imbalance, based on the current market volatility. Smaller multiples may capture smaller imbalances, while larger multiples may filter out smaller imbalances, providing adaptability to varying market conditions.
Imbalance Min Range Percent (int): The "Imbalance Min Range Percent" parameter determines the minimum percentage by which the low of the current bar must deviate above the high of the bar two periods ago (for upward imbalances) or the high of the current bar must deviate below the low of the bar two periods ago (for downward imbalances) to qualify as an imbalance. It uses the Donchian Channel to calculate this deviation. The gap between the respective price levels must be at least the specified percentage of this price range to be recognized as an imbalance. Adjusting this parameter allows you to control the minimum percentage deviation required for identifying a potential trend change.
ATR Period (int): This parameter sets the period or length of the Average True Range (ATR) indicator used in dynamically determining the minimum gap size based on market volatility. A longer ATR period results in a smoother adjustment to volatility changes, while a shorter period makes the indicator respond more rapidly to volatility fluctuations.
DC Period (int): Specify the period or length of the Donchian Channel (DC) indicator used in calculating the dynamic gap size based on the price range between the respective price levels for upward and downward imbalances. Adjusting the "DC Period" parameter allows you to control the sensitivity of the indicator to price range changes when identifying imbalances.
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).
