Moving Average Calculator
Paste ordered prices and compare rolling simple, exponential and linear-weighted moving averages on one auditable path. Choose the EMA seed convention explicitly instead of relying on a hidden platform default.
Enter the ordered price series
Oldest row first. Keep the symbol, timeframe, feed and applied-price basis consistent.
Three-method moving-average audit
Moving Average Comparison 2.0.0.
Latest value comparison
A positive price difference means only that the latest entered price is numerically above that average.
| Method | Latest value | Price minus average | Convention |
|---|
Entered price and average paths
Shared vertical scale; the three averages begin at the first complete window.
Complete-window audit table
Up to the latest 100 complete-window rows are displayed.
On smaller screens, scroll this table horizontally; the page itself remains contained.
| Label | Price | SMA | EMA | LWMA |
|---|
How the three moving averages are calculated
EMA = α × Current price + (1 − α) × Previous EMA
α = 2 ÷ (N + 1)
LWMA = Σ(Price × ascending weight 1…N) ÷ [N × (N + 1) ÷ 2]
SMA gives every value in the latest complete window equal weight. LWMA gives the oldest value weight 1 and the newest value weight N. EMA recursively carries prior history through the selected seed convention.
With a first-entered-price seed, EMA begins at row one and the first N minus 1 values remain warm-up. With a first-complete-window-SMA seed, the first reportable EMA equals the first SMA. Different chart history and initialization rules can therefore produce different EMA values.
Worked example from the audited fixture
Load the example to enter prices 1, 2, 4, 8 and 16 with period 3 and the first-entered-price EMA seed. The latest SMA is 9.33333333, the EMA is 10.6875 and the LWMA is 11.33333333.
The latest three-method range is 2. The price is 6.66666667 above the SMA. These differences show how weighting and initialization affect the same entered sequence; they are not direction or entry labels.
Use and limitations
- Use one ordered, positive price series from one consistent symbol, timeframe, feed and applied-price basis.
- CSV headers can identify a label/date column and one price, close, value or applied-price column; other data is ignored.
- Labels are descriptive. Dates are not parsed, sorted, deduplicated or checked for missing intervals.
- EMA parity depends on both the chosen seed and the amount of earlier history supplied.
- The path comparison contains no crossover, trend, momentum, forecast or trading recommendation.
Frequently asked questions
- Enter one positive price per row, an optional label plus price, or delimited data with a header identifying one price, close, value or applied-price column. Rows remain in the entered order.
- Each reportable SMA sums the latest N entered prices in a complete rolling window and divides by N.
- The EMA uses alpha equal to 2 divided by N plus 1 and recursively combines the current entered price with the previous EMA.
- Choose the convention used by the system you are auditing. First entered price preserves the earlier page convention; first complete-window SMA starts the reportable EMA at that first SMA.
- Within each complete window, the oldest price receives weight 1 and the newest receives weight N. The weighted total is divided by N times N plus 1 divided by 2.
- Available history, seed convention, applied price, bar order and implementation details can change the recursive path. Match those inputs before expecting parity.
- No. Labels are descriptive and the calculator neither parses timestamps nor repairs, sorts or deduplicates the entered sequence.
- No. The calculator reports numeric paths and differences only. It does not classify a crossover, trend, buy, sell or forecast.
Sources and methodology
- MQL5 Reference — iMA — documents the period, shift, smoothing method and applied-price inputs used by the platform interface.
- MQL5 Reference — Smoothing Methods — distinguishes simple, exponential, smoothed and linear-weighted methods.
- MQL5 — Moving Average from scratch — publishes calculation examples and discusses initialization choices.
Version 2.0.0 performs deterministic local arithmetic and uploads no entered values. SMMA is intentionally outside this three-method comparison.
Continue entered-price analysis
Compare Top Forex Brokers
Moving-average arithmetic does not establish execution quality or suitability. Verify the current entity, account, symbol, spread, commission, financing and execution terms available in your jurisdiction.
Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. Moving-average calculations do not predict direction, execution or returns. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and entity.

