Free Forex indicator · MT4 / MT5

Laguerre Indicator for MT4 & MT5: Free Download

A bounded momentum oscillator with adjustable Gamma, optional higher-timeframe calculation and separate controls for arrows and notifications.

ForexBestRobots edition 1.04

Reviewed by ForexBestRobots Editorial Team

Original sourceEarnForex 1.03
PlatformsDesktop MT4 · MT5
LicenseApache 2.0 · Free
On this page

What Laguerre shows

Laguerre transforms Close through four recursive filter stages into a value between 0 and 1. It is sometimes called Laguerre RSI, but it does not use the standard RSI average-gain/average-loss calculation. The 0.2 and 0.8 levels describe oscillator crossings; they do not establish a complete entry, stop or exit rule.

ForexBestRobots edition 1.04 is a marked adaptation of EarnForex 1.03, based on Emerald King’s work. It adds parameter and data guards, deterministic bounded-window recalculation, separate instance ownership and explicit confirmation timing. The downloads retain the unchanged original, copyright notices, Apache 2.0 and a patch showing our changes.

The four-stage calculation

Each new Close updates L0, L1, L2 and L3 using their previous values. CU is the sum of positive adjacent differences; CD is the sum of their negative magnitudes. The result is CU/(CU+CD). If the total is at most 1e−12 times the absolute Close, this edition returns 0 to avoid an unstable division. Zero is a valid reading.

All four stages start at zero at the oldest retained source candle. CountBars includes the forming candle: 950 by default, from 3 to 100000; 0 does not mean all history. The bounded window is rebuilt on every calculation. Its rolling start, Gamma and corrected prices can change older values. Candles before that window remain empty; there is no separate fixed warm-up period.

L0_t = (1-g) * Close_t + g * L0_(t-1)
L1_t = -g * L0_t + L0_(t-1) + g * L1_(t-1)
L2_t = -g * L1_t + L1_(t-1) + g * L2_(t-1)
L3_t = -g * L2_t + L2_(t-1) + g * L3_(t-1)
CU_t = max(L0-L1,0) + max(L1-L2,0) + max(L2-L3,0)
CD_t = max(L1-L0,0) + max(L2-L1,0) + max(L3-L2,0)
Laguerre_t = CU_t / (CU_t + CD_t)

Real EUR/USD examples

These are our reconstructions from archived real EUR/USD H1 OHLC, not terminal screenshots or a profit backtest. Each CSV includes the full calculation window. The final source record is an opening-price fixture for the next forming candle. Times are UTC; broker candle boundaries can differ.

Gamma 0.70, 10–12 June 2025. A: the 01:00 candle on 10 June falls from 1.000000 to 0.498382 below 0.8; confirmation is at 02:00. B: the 10:00 candle rises from 0.167381 to 0.296783 above 0.2; confirmation is at 11:00. Letters mark source events; price-panel verticals mark the following openings.
Gamma 0.70, 10–12 June 2025. A: the 01:00 candle on 10 June falls from 1.000000 to 0.498382 below 0.8; confirmation is at 02:00. B: the 10:00 candle rises from 0.167381 to 0.296783 above 0.2; confirmation is at 11:00. Letters mark source events; price-panel verticals mark the following openings.

Vector chart · Calculation data (CSV)

Gamma 0.30, 0.70 and 0.90 on the same 950-source-bar window, 16–19 June 2025. Different sensitivity and delay do not establish that one setting is more profitable. There is no trade, cost or exit model here.
Gamma 0.30, 0.70 and 0.90 on the same 950-source-bar window, 16–19 June 2025. Different sensitivity and delay do not establish that one setting is more profitable. There is no trade, cost or exit model here.

Vector chart · Calculation data (CSV)

H4 calculation mapped onto H1, 9–11 June 2025. The 11 June 12:00 H4 candle falls from 0.885060 to 0.736554; its closed event becomes known at 16:00. Purple is the final value mapped retrospectively from the source opening; dashed gold is the last closed H4 value available then. H4 bars are our UTC aggregates of four complete H1 records, not a broker H4 feed.
H4 calculation mapped onto H1, 9–11 June 2025. The 11 June 12:00 H4 candle falls from 0.885060 to 0.736554; its closed event becomes known at 16:00. Purple is the final value mapped retrospectively from the source opening; dashed gold is the last closed H4 value available then. H4 bars are our UTC aggregates of four complete H1 records, not a broker H4 feed.

Vector chart · Calculation data (CSV)

Timeframes and confirmation

TimeFrame=PERIOD_CURRENT uses the chart timeframe. An equal or lower selection also uses the chart timeframe. A higher selection must be an exact integer multiple of the chart duration; otherwise initialization is rejected. The program maps actual CopyRates timestamps. If history is not ready or invalid, it clears its outputs rather than retaining stale values.

Previous compares the two latest closed source candles at the next source opening. Current compares the forming source candle with the preceding closed one and can retract. Historical MTF plots map the final higher-candle value back to its opening; lower candles in that block can therefore change while the source candle forms. A plotted historical crossing is not proof that it was known at that earlier time.

Settings and defaults

InputDefaultPractical meaning
Comment_Main"======================="Visual separator; no calculation effect.
Gamma0.7Filter coefficient: finite 0 ≤ Gamma < 1.
CountBars950Latest source candles including the forming one; integer 3–100000. Larger windows cost more CPU.
TimeFramePERIOD_CURRENTCalculation timeframe; see the mapping and fallback rules above.
Comment_Alerts"======================="Visual separator; no calculation effect.
AlertOnUpperCrossfalseEnable notifications for a fall below UpperLevel.
AlertOnLowerCrossfalseEnable notifications for a rise above LowerLevel.
UpperLevel0.80Upper threshold; 0 ≤ LowerLevel < UpperLevel ≤ 1.
LowerLevel0.20Lower threshold under the same ordering rule.
TriggerCandlePreviousPrevious uses closed source candles; Current is provisional.
AlertPopuptruePopup delivery; also enable at least one crossing condition.
AlertSoundfalseWAV delivery; also enable a crossing condition.
AlertSoundFile"alert.wav"Sound file name, 1–128 characters, available to the terminal.
AlertEmailfalseEmail delivery; configure the terminal first.
AlertPushfalsePush delivery; configure the terminal and MetaQuotes ID first.
Comment_Arrows"======================="Visual separator; no calculation effect.
EnableDrawArrowsfalseDraw arrows independently of notification switches.
ArrowBuyCode241Upward arrow symbol code, integer 1–255.
ArrowSellCode242Downward arrow symbol code, integer 1–255.
ArrowSize3Arrow size, integer 1–5.
ArrowBuyColorclrLimeGreenUpward-arrow color.
ArrowSellColorclrRedDownward-arrow color.
IndicatorName"FBR_Laguerre"Unique name per chart: 1–20 ASCII letters, digits, underscores or hyphens.

Events, arrows and notifications

An upward event requires previous ≤ LowerLevel and current > LowerLevel; a downward event requires previous ≥ UpperLevel and current < UpperLevel. Both crossing switches are false by default. AlertPopup=true alone sends nothing. EnableDrawArrows is separate and false by default; the 0.5 line is only a reference.

Attachment, reset and recovery after missing history are silent for the active trigger candle. Gaps do not replay a queue of old messages. Later, Previous can notify once per new source opening; Current allows at most one attempt per source candle per direction. A failed channel attempt is consumed, not retried on every tick. Email and push require an online configured desktop terminal.

Confirmed arrows are placed at the first chart opening at or after the next source opening, never backdated to the event candle. Current can also show one provisional LIVE arrow, which moves and disappears if the crossing retracts. Use a distinct IndicatorName for each copy; cleanup is restricted to owned objects. The program does not send trading orders.

Install and compile

  1. Extract the ZIP for your desktop MT4 or MT5 platform.
  2. In MetaTrader choose File → Open Data Folder, then MQL4 or MQL5.
  3. Copy the package’s Indicators folder there; keep upstream separately as the original reference.
  4. Open Laguerre_ForexBestRobots.mq4 or .mq5 in the matching MetaEditor, press F7 and inspect errors and warnings.
  5. Refresh Navigator → Indicators and attach to a demo chart with enough history and a unique IndicatorName.
  6. Start with notification conditions disabled; compare closed source candles before enabling and configuring delivery channels.

Download Laguerre free

Each platform ZIP contains the marked source, unchanged EarnForex original, Apache 2.0, upstream identification, change notes, a patch, checksums and installation instructions in all 12 site languages. No DLL, external include or account registration is required to download it.

These are source packages without ready EX4/EX5 files. Numerical and modeled-API tests outside MetaTrader do not verify native MetaEditor compilation, terminal rendering or actual notification delivery. Compile and inspect diagnostics in the matching desktop terminal, then test on demo. Desktop custom indicators cannot be installed directly in the mobile app.

Free source ZIP · ForexBestRobots edition 1.04 · Compile in MetaEditor

Changing values and limitations

Gamma changes sensitivity; the history window and feed also matter. The current value and MTF block can change before source closure. Rolling the zero-seeded window or correcting history can change older values as well. This edition does not promise an immutable historical line.

Values near 0 or 1 can persist during a trend; 0.2/0.8 crossings can repeat in a range. The examples do not estimate win rate or include spread, commissions, position sizing or exit rules. Treat the oscillator as a calculation to investigate, not a guarantee of reversal or profit.

Frequently asked questions

Is Laguerre the same as standard RSI?

No. It uses four recursive Close-filter stages and adjacent-stage differences, rather than the standard RSI average gains and losses.

Which timeframes are supported?

Current, equal or lower selections use the chart timeframe. A higher timeframe must be an exact integer multiple of the chart duration.

When is a crossing confirmed?

Previous confirms after the source candle closes, at the next source opening. Current is provisional; lower-chart positions 1 and 2 are not necessarily closed higher candles.

Why is the line empty?

History may be unavailable or invalid, the chart candle may precede CountBars, or another instance may own that IndicatorName. Check the terminal Journal.

Does CountBars=0 load all history?

No. Valid integer values are 3–100000; 950 is the default and includes the forming source candle.

Can arrows work without notifications?

Yes. EnableDrawArrows is independent of both crossing-condition flags and the popup, sound, email and push switches.

Are these compiled and verified in MetaTrader?

No. They contain MQ4/MQ5 source. The numerical and modeled-API checks do not replace native compilation and demo-terminal testing.

Sources and review scope

The review follows the pinned EarnForex code and our documented changes. Original authorship and license notices are retained. The real-data figures are our own calculations; inclusion does not imply endorsement by Emerald King or EarnForex.