All indicators

6 Exponential Moving Averages 2 SMA

Jan 11, 2018

Static chart image
Support and ResistanceSignalsMoving Averages

The 6 Exponential Moving Averages 2 SMA indicator provides a comprehensive trend analysis toolkit by combining eight distinct moving averages into a single technical overlay to help traders identify multi-layered support, resistance, and momentum shifts.

Usage

The Usage of this tool centers on visualizing various trend horizons simultaneously. By plotting six Exponential Moving Averages (EMA) alongside two Simple Moving Averages (SMA), traders can assess short-term momentum and long-term structural trends without cluttering their chart with multiple separate indicators.

  • Trend Identification: When the shorter-term EMAs (e.g., 5, 9, 12) are positioned above the longer-term averages (e.g., 100, 200), the market is generally considered to be in a bullish phase. Conversely, when the shorter averages are below the longer ones, a bearish phase is indicated.
  • Dynamic Support and Resistance: The various lengths serve as dynamic levels where price may react. For instance, the 50 EMA and 200 SMA are frequently used by institutional traders as significant pivot zones.
  • Crossover Alerts: The script is pre-configured with alerts for crossovers between the 5-period EMA and the 21-period EMA. A crossover occurring at the close of a bar can signal a potential shift in short-term trend direction.

Details

The script utilizes two different types of moving average calculations to provide a balanced view of market activity.

  1. Exponential Moving Averages (EMA): These give more weight to recent price data, making them more responsive to new information. This is ideal for the shorter-term periods (5, 9, 12, 21) included in the script to capture quick momentum changes.
  2. Simple Moving Averages (SMA): These calculate the unweighted mean of the price over a specific period. These are typically used for longer-term analysis (100, 200) to identify the "true" average price over a significant duration, filtering out minor price fluctuations.

The indicator is a refactored version of the original work by @ChaloI, updated for Pine Script v5/v6 compatibility with optimized alert functionality and visual clarity.

Settings

  • EMA 1-6: Adjusts the lookback period for the six exponential moving averages. Default values are 5, 9, 12, 21, 50, and 200.
  • Source One-Six: Determines the price data used for the EMA calculations (e.g., Close, Open, High, Low).
  • SMA 1-2: Adjusts the lookback period for the two simple moving averages. Default values are 100 and 200.
  • Source Seven-Eight: Determines the price data used for the SMA calculations.

FAQ

How do the alerts work for this indicator? The indicator includes built-in alert conditions for when the 5-period EMA (EMA 1) crosses over or under the 21-period EMA (EMA 4). These are triggered once per bar close to ensure signal validity.

Can I use different price sources like "hl2" or "vwap" for the averages? Yes, each of the eight moving averages has a "Source" input that allows you to select various price components or other indicator outputs as the basis for the calculation.

How can I access the 6 Exponential Moving Averages 2 SMA tool? 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.