RepositoryMQL5JPNhật Bản
xxvw

xxvw/ICT_Library_MQ5

ICT Concept OSS Library for MQ5/MT5

111sao
19fork
0issue
2lượt xem

SMC/ICT Library for MetaTrader 5

English · 日本語 · 简体中文 · Español

An MIT-licensed MQL5 library for detecting and retrieving Smart Money Concepts (SMC) and Inner Circle Trader (ICT) patterns in MT5. Use typed snapshots inside an EA or read the same results as JSON from Python, TypeScript, C#, Go, Java, or Rust.

Detection uses closed candles and broker time. Numerical rules are explicit, configurable project definitions; see detection rules.

What is included

AreaCapabilities
Structure and zonesConfirmed swings, BOS, CHoCH, order blocks, FVG, breaker blocks, liquidity, premium/discount, OTE, and sessions
Additional ICT patternsDisplacement, MSS, IFVG, BPR, previous-day/week and completed-session highs/lows, broker daily/weekly opening gaps, SMT divergence, and Power of Three
Data accessSmcConfig, SmcSnapshot, per-concept readiness, stable record IDs, lifecycle states, UTF-8 JSON, and existing CSV export
ExamplesA snapshot-export EA that places no orders; six external-language JSON readers; existing visualizer and sample trading EA
Optional analysisCurrency strength, historical-volatility analysis, Python training scripts, and ONNX utilities

Start in MT5

  1. In MT5, choose File → Open Data Folder.
  2. Copy Include/SMC/ into MQL5/Include/SMC/ and Experts/SMC_Snapshot_Export.mq5 into MQL5/Experts/.
  3. Compile the export EA in MetaEditor, attach it to a chart, and inspect its Experts log. It exports a new snapshot when a candle closes without placing trades.
  4. Read the JSON file in MT5's shared Terminal/Common/Files/ directory with one of the examples below.

For MQL5 integration, initialize a configuration and check both update success and snapshot status:

#include <SMC/SmcManager.mqh>

CSmcManager smc;

int OnInit()
{
   SmcConfig config;
   config.SetDefaults();
   return smc.Init(_Symbol, _Period, config) ? INIT_SUCCEEDED : INIT_FAILED;
}

void OnTick()
{
   if(!smc.Update())
      return; // Read GetStatus()/GetSnapshot() for unavailable-module details.

   SmcSnapshot snapshot;
   if(!smc.GetSnapshot(snapshot) || snapshot.status != SMC_STATUS_READY)
      return;

   for(int i = 0; i < ArraySize(snapshot.records); i++)
      if(snapshot.records[i].concept == ICT_IFVG)
         Print(snapshot.records[i].id, " ", snapshot.records[i].state);
}

void OnDeinit(const int reason) { smc.Clean(); }

The existing Init(), Update(), Clean(), and getter interfaces remain available. See the quick start, snapshot API, and compatibility notes.

Read results in another language

Each example accepts a snapshot path and optional --concept IFVG --direction bearish filters. The readers share a fixture and expected output; detection stays in MQL5.

LanguageSetup and run instructions
Pythonexamples/python
TypeScriptexamples/typescript
C#examples/csharp
Goexamples/go
Javaexamples/java
Rustexamples/rust

The data contract and JSON Schema define versioning, timestamps, statuses, and record fields. Broker timestamps have no UTC suffix. Missing history is reported separately from a successful evaluation with no matches.

Documentation and development

All changes go through small PRs to main, with local validation before squash merge. Commit one completed unit, validate it, and push it before starting another. CI runs locally; GitHub hosted and self-hosted runners are not required.

python -m pip install -r requirements-dev.txt
python tools/setup_hooks.py
python tools/check_all.py

Full validation also requires MetaEditor/MT5 and the sample-language toolchains; follow the development guide. Missing tools and interrupted checks fail validation.

Python CSV processing, terminal connectivity, and ML training have separate dependency sets. See quick start: Python.

License

MIT. The library and examples support research and software development. Pattern detections are data, and do not establish profitability. The existing SMC_Sample_EA.mq5 can place orders; use SMC_Snapshot_Export.mq5 for data-only integration.

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryHTML
youcefito/mt5-quiet-automata

Run MT5 as Stealth Windows Service for Automated Trading, 2026

128
Nov 26, 2026
RepositoryMQL5
nkanven/MT4-MT5-Trading-EA-Collections

This repository is about some of my various MT4/MT5 EA you everyone can use for free. I implemented various strategies and scripts you can customize for your projects.

146
Dec 11, 2024
RepositoryMQL5
MT5-Automation-Labs/mt5-gold-scalper-ea

MT5 gold (XAUUSD) M1 scalper EAs: Z-score mean reversion plus trend breakout, with dynamic equity risk tiers, session window, spread filter and cost-aware broker-side take-profit.

135
Oct 15, 2026
RepositoryC#
vdemydiuk/mtapi

MetaTrader API (terminal bridge)

711
Nov 24, 2026
RepositoryPython
devcartel/pymt5

Python API for interacting with DevCartel MetaTrader 5 gateway

148
Feb 2, 2023
RepositoryHTML
Dream-XR/MT5-Post-Trade-Insight-Reporter

AutoTrade Forex Signals: Telegram to MT5 EA 2026 Strategy

121
Nov 27, 2026
RepositoryHTML
tharindu2028/Trade-Terminator-Closer

Best MT4 MT5 Close All Orders Script 2026 Automated Position Management

115
Nov 25, 2026
RepositoryC++
mikha-dev/mt4-websockets

Turns Metatrader4/MetaTrader5 into web socket client

100
Dec 21, 2022
RepositoryMQL5
francomascareloai/EA_SCALPER_XAUUSD

WIP — XAUUSD (Gold) automated-trading research, in the open. MQL5 (public) + Python/NautilusTrader (private). Studied thousands of bots first. No signals, no profit claims — just the engineering.

316
Nov 19, 2026