All indicators

EMA & Supertrend

May 7, 2021

Static chart image
Support and ResistanceSignalsMoving AveragesVolatility

The EMA & Supertrend indicator is a trend-following tool that combines multiple Exponential Moving Averages (EMA) with a Supertrend component to help traders identify entry and exit points based on momentum and trend direction.

Usage

The tool is primarily used to identify trend shifts and potential entry signals through EMA crossovers and price action relative to moving averages.

  • Long Entry: A buy signal is generated when the faster EMA (EMA 1) crosses above the slower EMA (EMA 2), or when the price closes above EMA 1 while EMA 1 is greater than EMA 2 and price is above EMA 4.
  • Exit Strategy: Positions are typically closed when the price closes below the EMA 2 line, signaling a potential trend exhaustion or reversal.
  • Trend Confirmation: The script includes longer-term averages (200 and 233 EMAs) and a Supertrend calculation to provide a broader context for the current market direction.

Details

The script executes logic based on the interaction between several moving averages and an Average True Range (ATR) based Supertrend. The EMA components allow for dynamic support and resistance identification, while the Supertrend filter helps in mitigating noise during sideways markets. The inclusion of the 233 EMA serves as a high-frame institutional reference point. The strategy component automates these rules to visualize historical performance.

Settings

EMAs

  • EMA 1 Length: Sets the period for the first Exponential Moving Average (Default: 21).
  • EMA 2 Length: Sets the period for the second Exponential Moving Average (Default: 55).
  • EMA 3 Length: Sets the period for the third Exponential Moving Average (Default: 200).
  • EMA 4 Length: Sets the period for the fourth Exponential Moving Average (Default: 233).

Supertrend

  • ATR Period: The lookback period used for the Average True Range calculation.
  • Source: The price source used for the Supertrend calculation (e.g., hl2).
  • ATR Multiplier: The coefficient used to set the distance of the Supertrend bands from the price.
  • Change ATR Calculation Method?: Toggle between using a standard ATR or a Simple Moving Average of the True Range.

Visuals

  • Show Buy/Sell Signals?: Toggles the visibility of the "Buy" and "Sell" labels on the chart.
  • Highlighter On/Off?: Enables or disables the background/cloud coloring based on the current Supertrend direction.

FAQ

How do I access the EMA & Supertrend tool?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Can I change the signal sensitivity?

Yes, by adjusting the EMA 1 and EMA 2 lengths, or by modifying the ATR Multiplier in the Supertrend settings, you can make the indicator more or less sensitive to price fluctuations.

Does this script provide alerts?

Yes, the script includes alert conditions for Supertrend direction changes and specific strategy execution signals for entering or exiting positions.

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.