Loading…

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

SettingDefaultWhat it does
Lookback bars500Bars to scan (from the current chart timeframe)
Swing bars3Fractal arm length either side of a swing (bars)
Tolerance pips15Match tolerance for "near a level" (pips)
Round step pips50Round-number spacing to test against (pips)
Use prior daytrueCount prior day high/low as a level type
Use prior weektrueCount prior week high/low as a level type
Use round numberstrueCount round-number levels as a level type
Use pivottrueCount classic daily pivot (PP/R1/R2/S1/S2) as a level type
Use swing levelstrueCount a structurally distant prior swing as a level type
Min score to draw2Only mark reactions scoring at least this high
Max reactions drawn40Cap on chart objects created (keeps the chart readable)
Object prefixLCS_Prefix for every object this script creates

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Pivot Points · Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria