Two Indicator Agreement Matrix
Two indicators pointing the same way is a common discretionary filter, but traders rarely check whether agreement on their own chart has ever meant anything. This tool answers that directly: a Close-vs-SMA trend read and an RSI(14) threshold read are combined into four states - Agree Bull, Agree Bear, Conflict, and Neutral - painted as a coloured histogram in a subwindow, and every historical bar whose forward outcome is already known is bucketed by its state at the time. The bucketing only uses bars old enough that InpLookaheadBars have already elapsed since - a bar from three bars ago has no verified outcome yet and is correctly left out of the table rather than guessed at. The resulting on-chart panel shows, per state, how many times it occurred, the average forward price move in points, and (for the two agreement states) the hit rate of that move going the expected direction. A conflict or neutral state with a similar average move to an agreement state is a plain signal the "agreement" being watched adds nothing on this particular symbol and timeframe - exactly the kind of honest negative result a purely visual agree/disagree indicator cannot show. The two base signals (Close vs SMA, RSI vs a symmetric threshold band) are intentionally simple and swappable - the point of the tool is the agreement scoring machinery, not these particular two indicators. Notes and limitations - Non-repainting: every bar's state is fixed by that bar's own completed Close, MA and RSI values, and the outcome table only scores bars whose forward window has already closed. - The outcome table recomputes once per new closed bar, not every tick, to keep the indicator light. - The two base signals are deliberately simple placeholders. Swapping in a different trend read or oscillator changes the classification logic but not the outcome-scoring approach. - The histogram plots one bar-height marker per state per bar; it does not attempt to draw a single colour-graded line, since this MQL4 build has no DRAW_COLOR_HISTOGRAM plot type.
Indicator · MT4 · v1.0 · Free
About Two Indicator Agreement Matrix
Two Indicator Agreement Matrix is an indicator for MetaTrader 4 based on RSI and Moving Average. It has 6 settings, such as Ma period, Rsi period and Rsi upper. MQL source code included.
Files in the download: TwoIndicatorAgreement.mq4, TwoIndicatorAgreement.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Ma period | 20 | Signal A: SMA period, Close vs this MA sets trend bias |
| Rsi period | 14 | Signal B: RSI period |
| Rsi upper | 55.0 | RSI above this = bullish bias |
| Rsi lower | 45.0 | RSI below this = bearish bias (between the two = neutral bias) |
| Lookahead bars | 10 | Bars ahead used to score each state's historical outcome |
| Stats lookback bars | 2000 | How many recent closed bars feed the outcome table (performance cap) |
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: RSI · Moving Average · Buy/Sell Arrows · Trend · MT4 Indicator · MQL4 Source Code