Buffer Normaliser Wrapper
An oscillator that already runs 0-100, a raw ATR value in price units, and a custom momentum buffer with no fixed bounds at all cannot be usefully overlaid on the same subwindow - their scales have nothing in common. This wrapper reads one selected source and rescales it into a chosen output range (0-100 by default) so several instances, each wrapping a different underlying tool, can share one subwindow and actually be compared by eye. The rescale uses a rolling min/max window rather than a single fixed min/max taken once over all loaded history. A fixed range looks fine the day it is set, then goes stale the moment volatility regime changes - a source that used to swing widely now barely moves inside its old fixed bounds, flattening the normalised line into a narrow band near the middle or an edge. A rolling window keeps the output using the full range continuously, at the cost of not being comparable in absolute terms across two dates with very different volatility - a trade-off stated plainly rather than hidden. Six built-in source kinds are provided directly (MA, RSI, CCI, ATR, Momentum, tick volume) plus a generic custom-indicator mode that calls iCustom by file name and buffer index, covering the common case of a custom tool whose signature takes two leading int parameters (most period/mode-style indicators fit this shape) followed by mode and shift like every iCustom call. Notes and limitations - The rolling window means the output is only meaningful relative to recent history, not as an absolute reading comparable across two very different market periods - by design, see above. - A flat window (source value constant across the whole lookback) is parked at the output range's midpoint rather than an edge, since there is no meaningful "low" or "high" to report when nothing moved. - The generic custom-indicator mode assumes a two-leading-int- parameter signature ahead of mode/shift. A custom indicator with a genuinely different parameter shape (strings, doubles, more than two parameters) cannot be wrapped through this generic path - copy the wrapper's ReadRaw() function and hand-adjust the iCustom call for that specific indicator's real signature instead. - Recomputing the full lookback window for every bar on a full history reload is O(bars x lookback); a very large InpLookback on a very long chart history can make the first calculation pass noticeably slower, though live tick updates after that only touch the newest bars.
Indicator · MT5 · v1.0 · Free
About Buffer Normaliser Wrapper
Buffer Normaliser Wrapper is an indicator for MetaTrader 5 based on RSI, Moving Average, CCI and ATR. It has 12 settings, such as Source kind, Custom name and Custom buffer. MQL source code included.
Files in the download: BufferNormaliserWrapper.ex5, BufferNormaliserWrapper.mq5, BufferNormaliserWrapper.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Source kind | SRC_RSI | Source indicator kind |
| Custom name | Custom indicator file name (SRC_CUSTOM only, no .mq4/.mq5) | |
| Custom buffer | 0 | Custom indicator buffer index to read (SRC_CUSTOM only) |
| Custom param1 | 0 | Custom indicator generic int param 1 (0 if unused) |
| Custom param2 | 0 | Custom indicator generic int param 2 (0 if unused) |
| Ma period | 20 | Period for MA / RSI / CCI / ATR / Momentum |
| Ma method | MODE_SMA | MA method (SRC_MA only) |
| Applied price | PRICE_CLOSE | Applied price (SRC_MA / SRC_MOMENTUM only) |
| Lookback | 100 | Rolling window for min/max rescale, bars |
| Range low | 0.0 | Output range low bound |
| Range high | 100.0 | Output range high bound |
| Clamp output | true | Clamp output strictly inside the range bounds |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: RSI · Moving Average · ATR · CCI · Volume · Momentum · Oscillator · MT5 Indicator · MQL5 Source Code