Cluster 1

MQL5 Market Structure

Build the part of an SMC indicator that decides what the market is doing: confirmed swings, internal and swing legs, BOS, CHoCH, confluence and trend state. The code in this cluster is designed to be deterministic on closed bars.

How to Code BOS and CHoCH in MQL5Pivot arrays, break events, trend transitions and non-repainting checks.Start here Internal vs Swing Structure in MQL5Two pivot engines, two trend states and why they must not share buffers.4 articles MQL5 SMC Confluence FilterWick/body confluence, level equality and reducing weak breaks.Advanced MQL5 Candlestick Trend ColoringColor buffers, plot types and correct chart repaint behaviour.Implementation

The rule for this cluster

Every article assumes a series-sorted rates array where index zero is the newest bar. A swing is confirmed only after the required bars on the right have closed. A break is evaluated on a closed bar. The trend state changes only after a confirmed swing is broken. If those three rules are not true, the rest of the SMC engine cannot be trusted.

Read the pillar guide first, then work through the four articles in order.

Educational content. Test all code in MetaEditor and Strategy Tester.

🚀 Invite friends — Earn $5 You both get $5 credit on Go Ad · opencode.ai AI-Powered Coding Agent — Try Free Build apps, fix bugs & ship faster with opencode. Get $5 free credit when you join. × Ad · quo.com QuoPhone — $20 Visa Gift Card Free Sign up to Quo, subscribe 3 months, get a $20 Visa gift card. Atif's referral gift for you. ×