Level Confluence Scoring Study
Traders often eyeball a reversal and say it happened "at a confluence of levels", but a naive version of that idea double-counts. Five round-number multiples stacked on top of each other are one idea (roundness), not five separate confirmations, and a level list that just counts how many raw lines are nearby will happily score a boring round-number cluster higher than a reaction that combined a prior day high with a pivot and a distant structural swing - genuinely three different sources of interest. This script scores by level TYPE, not by raw level count. Each of five groups - prior day high/low, prior week high/low, round numbers, the classic floor-trader daily pivot (PP/R1/R2/S1/S2), and a structurally distant prior swing - can contribute at most one point regardless of how many of its own levels are nearby. A reaction that touches three different groups scores 3, the same as a reaction touching three round numbers in a row would only ever score 1 for roundness. Reactions are found with a simple fractal swing test (a bar whose high or low is the extreme across a chosen number of bars either side), scanned oldest-to-newest so the "distant prior swing" group only ever compares against reactions that genuinely came earlier. The highest-scoring reactions are marked on the chart with their score, and the full table - time, type, price, score, matched groups - is printed to the Experts tab for closer reading. Notes and limitations This is a study tool, not a signal generator - a high score describes where price reacted in the past, not a prediction that the same level will hold next time. The fractal swing test is a simple local-extreme check, not a full market-structure algorithm, so very choppy price can produce swings that are not visually obvious. Prior day/week levels and pivots need enough D1/W1 history loaded for the symbol; if the terminal has not downloaded it, those groups silently contribute no matches for early reactions rather than failing the whole run. Places no orders and reads no account or trade state.
Script · MT4 · v1.0 · Free
About Level Confluence Scoring Study
Level Confluence Scoring Study is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 12 settings, such as Lookback bars, Swing bars and Tolerance pips. MQL source code included.
Files in the download: LevelConfluenceStudy.mq4, LevelConfluenceStudy.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Lookback bars | 500 | Bars to scan (from the current chart timeframe) |
| Swing bars | 3 | Fractal arm length either side of a swing (bars) |
| Tolerance pips | 15 | Match tolerance for "near a level" (pips) |
| Round step pips | 50 | Round-number spacing to test against (pips) |
| Use prior day | true | Count prior day high/low as a level type |
| Use prior week | true | Count prior week high/low as a level type |
| Use round numbers | true | Count round-number levels as a level type |
| Use pivot | true | Count classic daily pivot (PP/R1/R2/S1/S2) as a level type |
| Use swing levels | true | Count a structurally distant prior swing as a level type |
| Min score to draw | 2 | Only mark reactions scoring at least this high |
| Max reactions drawn | 40 | Cap on chart objects created (keeps the chart readable) |
| Object prefix | LCS_ | Prefix for every object this script creates |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Pivot Points · Alerts · MT4 Script · MQL4 Source Code