Two EMAs Trend

Two EMAs Trend NinjaTrader 8 indicator screenshot

Description

The Two EMAs Trend indicator for NinjaTrader 8 quantitatively assesses the strength of a trend by measuring the gap between two Exponential Moving Averages (EMAs) against an Average True Range (ATR) multiple, termed the Gap Min ATR Multiple. Upon a crossover, an upward trend is signalled if the EMA gap expands beyond the specified ATR multiple. This gap is dynamically monitored and updated to track the trend's sustainability; the uptrend persists as long as the EMA gap remains equal to or greater than the peak gap established since the trend's inception. For downtrends, the fast EMA crossing below the slow EMA initiates the trend signal.

This methodology effectively filters out minor price fluctuations and focuses on significant market movements, providing traders with clearer trend signals based on prevailing market volatility.

Key features:

  • Dual EMA gap measurement for trend confirmation.
  • ATR multiple to determine the significance of the trend.
  • Continuous update of the maximum EMA gap to monitor trend health.
  • A clear indication of trend reversals with EMA crossovers.

Use cases:

  • Long or short position entry on confirmation of an upward or downward trend.
  • Trend strength assessment for managing trade exits and take-profit levels.
  • Volatility-adjusted trend tracking to optimize position sizing and risk management.

Parameters

Fast EMA Period (int):

  • Description: This parameter sets the lookback period for the fast Exponential Moving Average. The fast EMA reacts more quickly to recent price changes and is critical for early trend detection.
  • Usage: A smaller value makes the indicator more sensitive to price movements, potentially leading to earlier signals. However, too small a value may increase the number of false signals.
  • Range: Must be an integer greater than or equal to 1.

Slow EMA Period (int):

  • Description: Defines the lookback period for the slow Exponential Moving Average. The slow EMA provides a smoothed reflection of price over time and establishes the baseline trend direction.
  • Usage: A higher value delays the trend signals, providing a more conservative approach. It is used in tandem with the fast EMA to confirm the trend.
  • Range: Must be an integer greater than or equal to 1, typically larger than the Fast EMA Period.

Gap Min ATR Multiple (double):

  • Description: The minimum multiple of the Average True Range (ATR) that the EMA gap must exceed to validate the trend. This multiple adjusts the sensitivity of the trend confirmation to market volatility.
  • Usage: It filters out smaller price movements, allowing a trader to focus on more significant trends. The higher the multiple, the stronger and more volatile the price movement needs to be to confirm the trend.
  • Range: Must be a non-negative value. A value of 0 indicates no minimum threshold, whereas higher values require a larger gap between the EMAs relative to volatility.

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).

Build Your Trading Edge

Get The Playbook — our weekly email: NinjaTrader indicator breakdowns, structured order-flow setups, and what we’re actually testing. No hype, no signals.

No spam, unsubscribe anytime. See our Privacy Policy.