FEMA - Four Moving Averages (8,13,21,55)
Jan 26, 2018

The FEMA - Four Moving Averages (8,13,21,55) indicator plots a series of simple moving averages to help traders visualize trend direction, momentum, and potential reversal points through historical price smoothing.
Usage
The Usage section focuses on how the multiple moving average lines interact to provide market context. Traders typically use this tool to determine the prevailing trend and identify high-probability entry or exit points:
- Trend Identification: When the shorter-term moving averages (8, 13) are positioned above the longer-term averages (55, 100), the market is considered to be in a bullish trend. Conversely, when shorter averages are below longer ones, the market is in a bearish trend.
- Crossover Signals: The script specifically monitors the interaction between the 8-period and 21-period averages. A bullish signal occurs when the 8-period SMA crosses above the 21-period SMA, while a bearish signal occurs when it crosses below.
- Dynamic Support and Resistance: The 55 and 100-period averages often act as significant dynamic support or resistance levels during trending markets, providing areas where price may stall or bounce.
Details
The FEMA indicator utilizes the Simple Moving Average (SMA) calculation, which averages price data over a specific number of periods. While the name suggests four averages, the script tracks five distinct lengths: 8, 13, 21, 55, and 100. This combination of Fibonacci-aligned numbers (8, 13, 21, 55) is intended to capture various cycles of market momentum.
The script is optimized for automated monitoring, featuring built-in alert conditions for crossovers between the 8-period (fast) and 21-period (medium) averages. The original logic was developed by @soni_kathatala and has been refactored for improved visual clarity and alert execution.
Settings
The current version of the script uses fixed period lengths to maintain the integrity of the FEMA system. The following parameters are defined within the calculation:
- MA(8): A short-term simple moving average used for immediate momentum tracking.
- MA(13): A short-term simple moving average used to confirm minor trend shifts.
- MA(21): A medium-term simple moving average used as the baseline for crossover alerts.
- MA(55): A long-term simple moving average used to define the primary trend direction.
- MA(100): A macro-level simple moving average used to identify major support and resistance zones.
FAQ
Which moving average crossover triggers an alert? The indicator triggers an alert whenever the 8-period SMA crosses over or under the 21-period SMA on a bar close.
What types of moving averages are used in this script? This script specifically uses Simple Moving Averages (SMA), which provide an equal weighting to all price points within the lookback period.
How can I access the FEMA - Four Moving Averages indicator? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.