All indicators

Ghost Ninja Moving Average by Hassonya

Nov 23, 2022

Static chart image
SignalsMoving Averages

The Ghost Ninja Moving Average indicator provides a dynamic trend-following system using three adaptive Exponential Moving Averages (EMA) that filter noise by appearing or changing color only under specific price and trend conditions.

Usage

The Usage section describes how the script can be used to identify trend shifts and momentum through conditional visibility.

  • Short-Term Momentum (EMA 21): This fast moving average tracks immediate price action. It is designed to "ghost" or disappear when the price falls below it, appearing only when the price is in a short-term bullish state.
  • Trend Filtering (EMA 55): This medium moving average serves as the primary trend gauge. It turns orange when the price and the fast EMA (21) are both above it, signaling strong bullish momentum. If these conditions are not met, it remains red.
  • Structural Support (EMA 233): This slow moving average represents the long-term trend. To keep the chart clean, it only appears on the screen when the medium-term trend (EMA 55) is positioned above the long-term trend.
  • Trend Reversals: The system automatically plots shapes to identify "Golden Crosses" (EMA 55 crossing above EMA 233) and "Death Crosses" (EMA 55 crossing below EMA 233).

Details

The Ghost Ninja Moving Average employs a conditional plotting logic to reduce visual clutter and focus the trader's attention on active trends. Unlike standard moving averages that remain static on the chart, this tool uses the following logic:

  • EMA 1 Logic: Visible only if Close > EMA 1.
  • EMA 2 Logic: Switches to orange if EMA 1 > EMA 2 and Close > EMA 2, otherwise it is red.
  • EMA 3 Logic: Visible only if EMA 2 > EMA 3.
  • Historical Limitation: The script utilizes the show_last parameter for all three averages, allowing users to define exactly how many bars back the lines should be drawn. This prevents historical data from overlapping with current analysis if desired.

Settings

The settings are categorized by the specific moving average they control:

  • Moving Average - 1: Sets the period for the fast EMA (Default is 21).
  • Number of bars back (MA 1): Determines how many historical bars of the first EMA are displayed on the chart.
  • Moving Average - 2: Sets the period for the medium EMA (Default is 55).
  • Number of bars back (MA 2): Determines how many historical bars of the second EMA are displayed on the chart.
  • Moving Average - 3: Sets the period for the slow EMA (Default is 233).
  • Number of bars back (MA 3): Determines how many historical bars of the third EMA are displayed on the chart.
  • Show Golden/Death Cross?: Toggles the visibility of the triangle shapes representing major trend crossovers.

FAQ

Why do some of the moving average lines disappear from my chart? The lines use conditional visibility. For example, the fast EMA (21) only appears when the price is trading above it, and the slow EMA (233) only appears when the medium trend is bullish.

Can I use different periods for the EMAs? Yes, you can adjust the length of each EMA in the settings menu to fit different timeframes or trading strategies.

How can I access the Ghost Ninja Moving Average? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.