xxvw/ICT_Library_MQ5
소개
ICT Concept OSS Library for MQ5/MT5
개발 도구측정된 스타 증가
- in 24h
- +1
- in 7 days
- -1
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSMC/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
| Area | Capabilities |
|---|---|
| Structure and zones | Confirmed swings, BOS, CHoCH, order blocks, FVG, breaker blocks, liquidity, premium/discount, OTE, and sessions |
| Additional ICT patterns | Displacement, MSS, IFVG, BPR, previous-day/week and completed-session highs/lows, broker daily/weekly opening gaps, SMT divergence, and Power of Three |
| Data access | SmcConfig, SmcSnapshot, per-concept readiness, stable record IDs, lifecycle states, UTF-8 JSON, and existing CSV export |
| Examples | A snapshot-export EA that places no orders; six external-language JSON readers; existing visualizer and sample trading EA |
| Optional analysis | Currency strength, historical-volatility analysis, Python training scripts, and ONNX utilities |
Start in MT5
- In MT5, choose File → Open Data Folder.
- Copy
Include/SMC/intoMQL5/Include/SMC/andExperts/SMC_Snapshot_Export.mq5intoMQL5/Experts/. - 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.
- 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.
| Language | Setup and run instructions |
|---|---|
| Python | examples/python |
| TypeScript | examples/typescript |
| C# | examples/csharp |
| Go | examples/go |
| Java | examples/java |
| Rust | examples/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
- Documentation index, including retained Japanese reference guides.
- MQL5 core architecture.
- Detection rules and defaults.
- Local validation and development.
- Contributing, code of conduct, security reporting, and changes.
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.
관련 프로젝트 살펴보기
불러오는 중…