New: the Top 10 Non-Repainting MT4 Indicator Pack is free to download

99 free indicators for MetaTrader 4 & 5

Fourier Extrapolator Indicator MT4

Free MT4 download: the Fourier Extrapolator fits a dominant price cycle with linear regression and Fourier analysis, then plots a forecast curve on chart. Free download, link emailed in seconds.

MT4RepaintsSignal & Arrow
Data Windowfourier-extrapolator-mt4
PlatformMT4 Build 600+
File.mq4 / .ex4 in .zip
Version1.0
Size3.7 KB
RepaintsYes
TypeSignal & Arrow
UpdatedSep 6, 2026
DownloadsNew listing
Download free (3.7 KB)
  • Enter your email, the download link arrives in seconds
  • Free bonus reports on the next page

Indicators are analysis tools, not trade signals. Forex trading on margin carries a high risk of loss. Test on a demo account first.

EURUSD · H4 · previewFourier Extrapolator Indicator MT4 v1.0
Fourier Extrapolator Indicator MT4 on EURUSD H4Repaints
How it works →
Overview

The Fourier Extrapolator is a chart-window MT4 indicator that hunts through recent price history for a dominant cycle and projects it forward as a forecast curve. It’s a free, instant download, and because it’s doing real signal-processing math under the hood rather than a simple moving average, it’s worth understanding exactly what it’s plotting before you put any weight on it.

What It Actually Calculates

On the first tick after it’s attached, the indicator runs a loop that shrinks a test window from your input T down to a fixed floor of 20 bars, one bar at a time. For every window size it does two things:

  • Runs af_LR(), a least-squares linear regression on Close[] over the window, producing a slope (aa) and intercept (bb) that de-trend the data.
  • Runs af_FT(), a discrete Fourier transform on the de-trended closes, computing cosine/sine coefficients (ak[], bk[]) for the first six harmonics and their power spectrum.

The code specifically watches harmonic #3. Whenever that harmonic holds the highest power in the spectrum, it stores the window’s coefficients; the moment a different harmonic takes over, it locks in whichever stored window scored highest and reconstructs a cosine/sine wave from those coefficients plus the linear trend. That reconstructed curve, extended forward, is the orange line you see (the prognoz[] buffer, drawn with DRAW_LINE at width 3).

A second, thinner blue line (the profit[] buffer) is a simple simulated equity curve: it walks backward from the current bar and adds or subtracts Open-Close depending on whether the forecast curve was sloping up or down at each step. It’s illustrative only, not a real strategy backtest.

How to Read the Chart

The orange curve is the fitted-and-extrapolated dominant cycle. Rising segments represent the projected bullish half of the cycle; falling segments represent the projected bearish half. When shift is greater than zero and showprofit is enabled, you’ll also see a vertical dashed orange time-line and a horizontal blue price-line marking the reference bar the whole projection is anchored to.

Inputs

  • T (default 1000) — the starting window length, in bars, that the cycle search begins shrinking from.
  • shift (default 0) — the bar index used as the anchor point for the projection; 0 means the analysis is anchored to the current bar.
  • showprofit (default true) — toggles the blue simulated equity line and the reference price/time lines; automatically disabled if shift is 0.
  • alert (default false) — pops an Alert() box when a new dominant cycle window is locked in during the search.

Why It Locks Onto One Specific Harmonic

Even though af_FT() computes six harmonics (k = 1 through 6) for every window size, the search loop only ever checks whether harmonic index 3 holds the maximum power in a four-element spectrum array covering indices 2 through 5. In other words, the indicator is deliberately narrow: it isn’t asking “what’s the strongest cycle in this data” across all possible frequencies, it’s asking “does the third harmonic dominate this particular window,” and only stores a candidate result when that specific condition is true. That’s also the likely source of the “4th cycle” in the indicator’s original file name — the code is fixed on one harmonic slot, not a general-purpose cycle finder that adapts to whichever frequency happens to be strongest.

Repaint Behavior — Read This Before Trading

This is the part that matters most. The entire calculation block only runs when an internal static counter (bars) is still at zero — in practice, that means it runs its full cycle search exactly once per attachment, then freezes. It will not recompute on subsequent ticks unless you remove and reapply it, reload the chart, or switch timeframes. But every time that fresh calculation does run, it rebuilds the whole forecast line — including the portion overlaying bars that were already printed and visible before — using the price data available at that moment. That means the same historical bars can show a visibly different orange curve the next time you reattach the indicator, because the linear regression and Fourier fit are recalculated over a shifted window of closes. Functionally, that’s repainting: the historical segment of the curve is not a fixed, tick-stable signal you can backtest against.

Limitations

  • It freezes after the first calculation — it will not update its forecast in real time as new bars form unless you reload it.
  • Running a Fourier transform at every window size from T down to 20 is computationally heavy; expect a noticeable pause on attach with large T values or deep history.
  • It’s a curve-fitting and extrapolation tool, not a complete trading system — there’s no built-in entry/exit logic, and the blue profit line is not a validated backtest.
  • Because it only recalculates once, the alert for a newly detected cycle will typically only fire at the moment of attachment, not continuously.
Fourier Extrapolator Indicator MT4 on an EURUSD H4 MT4 chart

Fourier Extrapolator Indicator MT4 on a MetaTrader chart. Click to enlarge.

Repaint verdict: repaints. This indicator recalculates recent bars, so its history looks cleaner than it traded. Use it to read structure, not as a backtested entry signal.

Free pack

Get the Top 10 Non-Repainting Indicator Pack

Ten MT4 indicators that draw on closed bars only, in one zip with install notes for each.

Settings

Inputs, defaults and what they change

  • T (default 1000) — Starting length (in bars) of the search window that shrinks down to 20 bars while looking for the strongest dominant cycle.
  • shift (default 0) — Bar index used as the anchor point for the cycle projection; 0 anchors the analysis to the current bar.
  • showprofit (default true) — Displays the blue simulated equity line plus reference price/time markers; disabled automatically if shift is 0.
  • alert (default false) — Shows a popup Alert() when a new dominant cycle window is locked in during the search.
Install

How to install it in MetaTrader 4

  1. Step 1Download and unzip

    Enter your email, open the download link we send you and extract the .mq4 / .ex4 file from the zip.

  2. Step 2Open the data folder

    In MetaTrader, go to File → Open Data Folder.

  3. Step 3Copy into Indicators

    Place the file in MQL4 → Indicators, then restart MetaTrader or refresh the Navigator panel.

  4. Step 4Attach it to a chart

    Find it under Navigator → Indicators and drag it onto any chart.

First time installing an indicator? Watch the 75-second video or follow the screenshots in our MT4 install guide: every click in MetaTrader, plus fixes for an indicator that won't show up.

Free forex calculators
FAQ

Fourier Extrapolator Indicator MT4 questions

Yes. Its forecast line is fully rebuilt from a fresh least-squares and Fourier fit each time the indicator initializes, so the same historical bars can display a different curve after a chart reload or reattachment.

The code only runs its calculation block once per attachment (guarded by an internal counter that starts at zero and is never reset), so it freezes after the first draw. Remove and reapply the indicator, or reload the chart, to force a fresh projection.

T sets the starting length, in bars, of the search window the indicator shrinks down (in steps of 1) while hunting for the window that produces the strongest third-harmonic Fourier component.

It’s a simulated equity curve built from the forecast’s up/down slope at each step, showing what a hypothetical trade following the curve’s direction would have done historically. It is not a validated backtest or a trading signal on its own.

Not Specified in the code — there’s no built-in timeframe or symbol restriction, but the heavy per-attachment Fourier calculation across up to 1000 bars runs faster on higher timeframes with fewer total bars in history.

Fourier Extrapolator Indicator MT4
Size
3.7 KB
Version
1.0
Repaints
Yes
Download free
Free packTop 10 Non-Repainting Indicators

Ten closed-bar MT4 indicators in one zip.

Get the pack

Fourier Extrapolator Indicator MT4Free · 3.7 KB

Download

Where should we email your download link?

Use an email you can check right now: the download link goes straight to this inbox.