
Every indicator answers one question. A moving average answers "where is the trend?", RSI answers "how strong is the move?", a volatility filter answers "is the market even moving?". Trading on one answer produces a flood of signals in the wrong conditions. Confluence — requiring several independent answers to agree — is the oldest fix in technical analysis. The hard part is engineering it so that any combination works without writing new code each time.
This article walks through the architecture I use, with MQL5 code you can drop into your own projects.

The key design decision: every indicator, no matter how complex, is reduced to two boolean series — Long[i] and Short[i] . Once that contract exists, the signal engine does not care whether a row is a SuperTrend, an Ichimoku cloud or a volume filter.
struct SigArr { char L[]; char S[]; }; // one pair per indicator SigArr g_sig[IND_COUNT]; void SS(const int id,const int i,const bool l,const bool s) { g_sig[id].L[i]=(char)(l?1:0); g_sig[id].S[i]=(char)(s?1:0); } // Example: a simple EMA filter reduced to Long/Short void CalcEmaFilter(const int id,const double &c[],const int n,const int len) { double a=2.0/(len+1.0), e=c[0]; for(int i=0;i<n;i++) { e=(i==0)?c[0]:a*c[i]+(1.0-a)*e; SS(id,i,c[i]>e,c[i]<e); } }
Using char instead of bool keeps the arrays compact, and a struct with dynamic arrays lets you hold any number of indicators in a single fixed-size array.
Not all inputs are equal. One indicator is the trigger — the event that starts a setup. The others are filters that must agree. Treating them differently matters: the trigger defines when, the filters define whether.
// Filters enabled by the user, stored as a compact id list int g_conf[]; int g_nconf=0; bool AllAgree(const int i,const bool longSide) { for(int k=0;k<g_nconf;k++) { int id=g_conf[k]; if(longSide && g_sig[id].L[i]==0) return(false); if(!longSide && g_sig[id].S[i]==0) return(false); } return(true); // zero filters = trigger alone }

Filters rarely flip on the same candle as the trigger. Requiring same-bar agreement throws away good setups; allowing agreement at any time later produces stale entries. The solution is an expiry window: count how many consecutive bars the trigger has been active, and only accept the setup while that count is within N.
int cntL=0, state=0; // state: +1 last long, -1 last short for(int i=1;i<n;i++) { bool trig=g_sig[lead].L[i]!=0; cntL = trig ? cntL+1 : 0; // how long has the trigger been on? bool valid = trig && AllAgree(i,true) && cntL<=expiry; if(valid && state!=1) { /* LONG signal on bar i */ } if(valid) state=1; // alternate mode: no LONG after LONG }
The state variable implements alternate mode: after a long, the next printed signal must be a short. This removes the "five arrows in a row" clutter most multi-indicator tools suffer from.
Evaluate signals only on closed bars (skip index rates_total-1 ) and never let a later bar modify an earlier decision. Indicators that use pivots (fractals, swing-based zones) must only use pivots that are already confirmed — a pivot of length L at bar p is known at bar p+L , never earlier.
bool PivotHigh(const double &h[],const int p,const int L,const int R,const int n) { if(p-L<0 || p+R>=n) return(false); // right side not printed yet for(int k=1;k<=L;k++) if(h[p-k]>=h[p]) return(false); for(int k=1;k<=R;k++) if(h[p+k]>h[p]) return(false); return(true); }

A confluence signal is only trusted if the trader can see the reasoning. A compact table with a Long and a Short column, one row per filter, answers the most common support question — "why didn't it signal here?" — before it is asked. Build it from OBJ_RECTANGLE_LABEL cells and OBJ_LABEL text, computing positions in pixels from the chart size so it works in any corner:
void Cell(string n,int x,int y,int w,int h,color bg) { if(ObjectFind(0,n)<0) ObjectCreate(0,n,OBJ_RECTANGLE_LABEL,0,0,0); ObjectSetInteger(0,n,OBJPROP_CORNER,CORNER_LEFT_UPPER); ObjectSetInteger(0,n,OBJPROP_XDISTANCE,x); ObjectSetInteger(0,n,OBJPROP_YDISTANCE,y); ObjectSetInteger(0,n,OBJPROP_XSIZE,w); ObjectSetInteger(0,n,OBJPROP_YSIZE,h); ObjectSetInteger(0,n,OBJPROP_BGCOLOR,bg); ObjectSetInteger(0,n,OBJPROP_BORDER_TYPE,BORDER_FLAT); ObjectSetInteger(0,n,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,n,OBJPROP_HIDDEN,true); } // check / cross marks: Wingdings 252 and 251 string Mark(bool ok){ return CharToString((uchar)(ok?252:251)); } // bottom-right placement that survives chart resizes int cw=(int)ChartGetInteger(0,CHART_WIDTH_IN_PIXELS); int ch=(int)ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS); int x0=cw-tableWidth-12, y0=ch-tableHeight-28;
Redraw the table in OnChartEvent on CHARTEVENT_CHART_CHANGE so it stays anchored when the user resizes the window.

Attached to this publication is ConfluenceForge_Sessions_PVSRA_Free.mq5, a complete, compile-ready indicator that demonstrates two techniques from this article:
Also included:
| Family | Answers | Examples |
|---|---|---|
| Trend | Which direction? | SuperTrend, Half Trend, EMA 200, RQK, Ichimoku |
| Momentum | Is the push strong now? | MACD, RSI, QQE, Stochastic, TSI |
| Volatility / volume | Is the market worth trading? | Choppiness, Damiani, Squeeze, WAE, Volume |
Pick one trigger and two or three filters from different families. Three trend filters agreeing is one opinion repeated three times; trend + momentum + volatility agreeing is genuine confluence.

A confluence engine is mostly a data-design problem: normalise every indicator to Long/Short booleans, separate the trigger from the filters, give filters an expiry window to agree in, evaluate on closed bars, and show the user the reasoning. With that contract in place, adding indicator number 54 is a single function.
Attachments: ConfluenceForge_Sessions_PVSRA_Free.mq5 · presets/*.set · ConfluenceForge_Cheat_Sheet.png. Trading involves risk; examples are educational and not investment advice.
Trend Strength Meter Using ADX in a Compact Dashboard
A compact on-chart dashboard that shows the trend strength of up to four timeframes using the ADX: value, strength bar, strength class and +DI/-DI direction, plus a summary row with the average ADX and the agreement of the directions.
Market Hours Label - is the symbol open now and when it closes
Small label on the chart. the symbol is open or closed now, the time left to the close or to the next open, and the sessions of today. It reads the trade sessions of your broker. Display only.
Trade Settings — Persist and Migrate Per-Trade Settings
Standalone MQL5 library for storing custom settings separately for each trade and following a verified pending-order-to-position lifecycle. It supports double, ulong and price-unit fields, terminal-local Global Variables, safe cleanup gates and an offline self-test. Includes a demo EA, source archive, and installation guide. A different-ticket transition, reconnection as a separate scenario, and netting behavior remain untested.
MACD Signals
Indicator edition for new platform.