Consensus Of Averages Line
Every moving average formula makes its own trade-off: an SMA has a hard window edge that drops old data all at once, an EMA carries an infinite (if decaying) tail of every past price, a weighted average over-emphasises whichever end of the window it favours. Each of these is a reasonable estimator of "where price broadly is right now," but each is also systematically biased in its own particular way, and that bias shows up most clearly exactly when it matters - during a fast move or a choppy patch, where the different formulas disagree with each other the most. This indicator computes ten differently-constructed averages at every bar, all sharing the same input period, and plots their median as the consensus line: Simple, Exponential, Smoothed (Wilder), Linear Weighted, a windowed Median, a Geometric mean, a Harmonic mean, a Triangular (SMA-of-SMA) average, a Midpoint (of the window's own high/low close) average, and a Quadratic-weighted average whose weights taper more steeply towards the recent end than a plain linear WMA's do. Taking the median of the ten rather than their average means a single outlier estimator - one formula reacting unusually to a particular price pattern - gets out-voted by the other nine rather than pulling the consensus line towards it, the same robustness a plain moving median has over a moving average, just applied one level up, across estimators rather than across raw prices. The shaded band behind the line shows the full spread from the lowest to the highest of the ten readings at each bar: a narrow band means all ten broadly agree; a wide one flags a bar where the choice of averaging method genuinely matters. "Matched period" here means all ten share the same InpPeriod input, not that their group delays have been individually tuned to line up. SMA and EMA of the same period do mathematically share the same (N-1)/2 group delay, so those two are genuinely lag-matched by construction; the other eight are not delay-matched beyond sharing the same period - a fully delay-matched consensus across ten structurally different formulas would need a different lookback per formula, which was judged more likely to obscure the comparison than clarify it, so the simpler same-period convention was kept instead and is stated here plainly rather than implied to be more rigorous than it is. Notes and limitations - Not recursive at the consensus level - each bar independently recomputes all ten estimators and their median from that bar's own window, so it never repaints once a bar has closed (the EMA and SMMA estimators are internally recursive, exactly as they always are, but that is standard MT4 iMA behaviour, not something this indicator adds). - Needs roughly 1.5x InpPeriod bars of history before it starts plotting, because the Triangular estimator is itself an average of averages and needs a little extra lookback beyond the shared period. - The ten estimators are computed independently at every bar (O(period) work each, times ten), which is intentionally simple and auditable rather than optimised - fine for chart-scale periods, not intended for very large periods on a very long history. - "Matched period" is a same-input-period convention, not a fully delay-matched design - see the full description for the honest detail.
Indicator · MT4 · v1.0 · Free
About Consensus Of Averages Line
Consensus Of Averages Line is an indicator for MetaTrader 4 based on Moving Average. It has 2 settings, such as Period and Applied price. MQL source code included.
Files in the download: ConsensusOfAverages.ex4, ConsensusOfAverages.mq4, ConsensusOfAverages.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Period | 14 | Shared averaging period |
| Applied price | PRICE_CLOSE | Applied price |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 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: Moving Average · MT4 Indicator · MQL4 Source Code