Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

LERM - Liquidity and Efficiency Regime Matrix - indicator for MetaTrader 5

Dario Cadeddu
Dario Cadeddu
Quantitative Trading Systems Developer focused on risk management, market regime analysis and structured trading workflows for MetaTrader 5.
Views:
36
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Idea

LERM classifies every bar into one of five market regimes: bullish/bearish trend, bullish/bearish exhaustion, volatility compression and noise. It combines three measurements:

LERM_EURUSD_H1

  • Fractal Efficiency Ratio (FER): net price move divided by the total path over N bars. 1 = perfectly directional, 0 = pure back-and-forth.
  • Compression Pressure: 1 − ATR(short)/ATR(long), clamped to 0..1. High values mean recent volatility is well below its reference level.
  • Time-adjusted volume Z-Score: tick volume is compared only with bars from the same time-of-day slot over the previous days, so the normal session cycle (e.g. the London open) does not create false spikes.

Regimes and colors

  • Green / Red: bullish / bearish trend (FER above threshold, direction measured over the FER window).
  • Blue: exhaustion. Volume spike, long rejection wick, new N-bar extreme. An upper wick means bearish exhaustion, a lower wick bullish.
  • Gold: compression (low short-term volatility relative to the long-term one).
  • Gray: noise.

The silver line is the FER.

Inputs

  • Fractal Efficiency Ratio period: bars used for FER and direction (default 14).
  • Short / Long ATR period: volatility windows for compression (7 / 50).
  • Volume profile lookback: days of history for the volume profile; on D1 and above, number of bars (25).
  • Minimum samples: below this the volume Z-Score is set to 0 (10).
  • FER threshold for trend: minimum efficiency for a trend regime (0.42).
  • Minimum compression pressure: threshold for the compression regime (0.45).
  • Volume filter for compression: ignore volume, require low volume (default) or require high volume, with its Z-Score threshold.
  • Volume Z-Score threshold for exhaustion (1.5), Minimum wick/range ratio (0.45), Maximum FER for exhaustion (0.75).
  • Exhaustion only at an N-bar extreme: 0 disables the check (10).
  • Same weekday only: compare volume only with the same day of the week.

For EA developers

Buffers available via iCustom/CopyBuffer: 3 = Regime_ID (0 noise, ±1 trend, ±2 exhaustion, 5 compression), 4 = volume Z-Score, 5 = compression pressure. Bar 0 uses partial tick volume and repaints: read from shift 1.

The default thresholds are reasonable starting values, not optimized ones. Test them on your own symbol and timeframe.


WATL for MT5 WATL for MT5

The indicator identifies price waves, marks their peaks and troughs with arrows at three levels, and automatically plots resistance and support lines based on them.

Prior Levels and Pivots Prior Levels and Pivots

Draws the previous day, week or month high, low and close, the current period open and Classic, Fibonacci, Camarilla or Woodie pivots for each period, with a panel showing the nearest level above and below price.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.