Exponential Moving Averages 12 & 26

Jun 28, 2018

Static chart image
Signals
Moving Averages

The Exponential Moving Averages 12 & 26 indicator tracks two popular short-term trend lines to identify potential momentum shifts and trend reversals through moving average crossovers.

Usage

The Exponential Moving Averages 12 & 26 tool is primarily used to identify trend direction and potential entry or exit points based on the interaction between a "Fast" and "Slow" average. Traders often look for crossovers as signals: a bullish signal occurs when the 12 EMA crosses above the 26 EMA, while a bearish signal occurs when the 12 EMA crosses below the 26 EMA.

Beyond crossovers, the distance between the two EMAs can indicate the strength of the current trend. A widening gap suggests increasing momentum, while a narrowing gap may precede a consolidation phase or a trend reversal. This tool is frequently utilized in trend-following strategies and is the foundation for other technical oscillators like the MACD.

Details

The script calculates two Exponential Moving Averages (EMA) based on user-defined lengths and price sources. Unlike Simple Moving Averages (SMA), EMAs apply more weight to recent price data, making them more responsive to new market information. This reduction in lag is particularly useful for short-term traders monitoring volatile price action.

The indicator includes built-in alert logic for crossovers. When the Fast EMA (default 12) crosses the Slow EMA (default 26), an alert is triggered at the close of the bar to notify the user of a potential trend change. This specific combination of 12 and 26 periods is widely regarded as a standard for short-term technical analysis.

Settings

  • Fast Length: Sets the lookback period for the faster EMA. The default is 12.
  • Fast Source: Determines the price data used to calculate the fast EMA (e.g., Close, Open, High, Low).
  • Slow Length: Sets the lookback period for the slower EMA. The default is 26.
  • Slow Source: Determines the price data used to calculate the slow EMA.

FAQ

How do I interpret the colors of the EMAs? By default, the 12 EMA (Fast) is plotted in green, while the 26 EMA (Slow) is plotted in red. When the green line is above the red line, the short-term trend is considered bullish.

Can I change the timeframes used for the calculations? Yes, you can adjust the "Fast Length" and "Slow Length" in the settings menu to adapt the indicator to different trading styles or asset classes.

How can I access the Exponential Moving Averages 12 & 26? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.