ICTLibraryEasy is a fast and simple ICT library that allows you to work with the most well-known ICT concepts such as FVG, Boschoch, Swing, etc. through classes and using the MQLArticles base framework.
- MQL5 97.8%
- MQL4 2.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| Images | ||
| Src | ||
| dependencies.json | ||
| ICTLibraryEasy.mqproj | ||
| LICENSE | ||
| README.md | ||
A simplified MQL5 library for integrating essential ICT (Inner Circle Trader) concepts into your trading bots and expert advisors.
Integrated Concepts
| Class | Concept | Description |
|---|---|---|
CFvgBar |
FVG | Detects Fair Value Gaps (bullish & bearish) with configurable minimum size and drawing style |
CBosChoch |
BOS / CHoCH | Identifies Break of Structure and Change of Character using swing-based logic |
CSwingBarPure |
Swings (Pure) | Detects swing highs and lows using a configurable candle-based method |
CSwingBarZigZag |
Swings (ZigZag) | Detects swing highs and lows using a ZigZag indicator approach |
CTradingSession |
Trading Session | Tracks session time windows, draws ranges and exposes session high/low |
CRangeSession |
Range Session | Similar at Trading Session, but with max and min session tracking |
Quick Start Examples
FVG — Fair Value Gap
#define DEFGLOBAL_SIMPLE
#include "..\\Global.mqh"
CFvgBar fvg;
int8_t idx_controler_d1 = INVALID_INDEX;
int OnInit()
{
const int atr_pos = ICTAtr_Create(PERIOD_CURRENT, _Symbol, 14, true);
CAtr* atr_ptr = ICTAtr_GetAtrPointer(atr_pos);
g_new_bar_manager.GetPosExecute(PERIOD_D1, idx_controler_d1);
fvg.Create(_Symbol, _Period);
fvg.SetGrapich(clrGreen, clrRed, clrGreen, clrRed, STYLE_SOLID, true, 1, true, 10, 1, STYLE_DOT);
fvg.Set(500, defined_pattern, fvg_1_vela, CreateDiffptr(MODE_DIFF_BY_ATR, _Symbol, atr_ptr, 1, 0.00));
return INIT_SUCCEEDED;
}
void OnTick()
{
const datetime curr_time = TimeCurrent();
g_new_bar_manager.Execute(curr_time);
if(CNewBarManager_IsNewBarM1(g_new_bar_manager))
{
const bool new_day = CNewBarManager_IsNewBar(g_new_bar_manager, idx_controler_d1);
ICTGen_FuncionOnBarM1(new_day, curr_time);
fvg.OnNewBar();
}
}
BOS / CHoCH — Break of Structure & Change of Character
// In OnInit()
g_bos_choch.Create(_Symbol, _Period);
g_bos_choch.SetGrapich(clr_Choch, clr_Bos, clr_Choch_2, clr_Bos_2, STYLE_DOT);
g_bos_choch.Init(2, clrRed, clrBlue, "Arial", 8, false, 30, MODE_SWING_STRICT, false, 500);
// In OnTick() — inside IsNewBar block
g_bos_choch.OnNewBar();
Trading Session
// In OnInit()
session.Create(_Symbol, _Period, 0, 0, true, true, 10, 0, 15, 0, "Trading session");
session.SetGrapichStyles(STYLE_SOLID, clrAntiqueWhite, 1, true);
session.SetExtra(clrAqua, clrAliceBlue, STYLE_SOLID, 2, draw_session_range_lines_and_rect);
// In OnTick() — inside IsNewBarM1 block
session.OnNewBarM1();
Swings — Pure method
// In OnInit()
MqlParam params[];
PureToParmas(5, 5, MODE_SWING_NO_STRICT, params);
swing.Create(_Symbol, _Period, 0, 0, true, params);
swing.SetProperties(clrBlue, clrRed, "H", "L", "Arial", 8, 10);
// In OnTick() — inside IsNewBar block
swing.OnNewBar();
Swings — ZigZag method
// In OnInit()
MqlParam params[];
ZZToParams(5, 400, false, params);
swing.Create(_Symbol, _Period, 0, 0, true, params);
swing.SetProperties(clrBlue, clrRed, "H", "L", "Arial", 8, 10);
// In OnTick() — inside IsNewBar block
swing.OnNewBar();
Repository Structure
ICTLibraryEasy/
├── Src/ # Wrapper for ICT concepts imported from ICTEasyLibrary.ex5
└── Images/ # Repository banner
Requirements
See the dependencies.json file.
License
By downloading, cloning, forking, or otherwise using this repository, you accept the license terms.
Examples
- Full examples (Ready-Use-Bots, Benchmarks, Simple examples): Click here
Note: To use the examples, enable the
ICTLIBRARY_EASY_LIBdefinition, as this is required if you are not using the paidICTLibrarylibrary.
Full Version — ICT FastLibrary
This repository includes 6 concepts as a free preview.
The full ICT FastLibrary includes 30+ concepts:
| Category | Concepts |
|---|---|
| Imbalances | FVG, Gap, Imbalance, RDRB + inverse versions |
| Blocks | BPR, Order Blocks, Breaker Blocks |
| Market Structure | BOS/CHoCH, CISD, MSS |
| Extra | Liquidity, SMT Divergence, DoubleTopBottom, BSL/SSL |
| Sessions | SessionContainer, SessionContainerMit |
| Custom | Build your own blocks + inverse versions |
| Pool | Full factory — reuse concepts, minimize memory |
Contact
- Platform: MQL5 Community
- Profile: https://www.mql5.com/es/users/nique_372
- Articles: https://www.mql5.com/es/users/nique_372/publications