ICTLibraryEasy/README.md

192 lines
5.5 KiB
Markdown
Raw Permalink Normal View History

2026-03-06 15:04:28 +00:00
<p align="center">
<img src="./Images/ICTLibraryEasyByLeo.png" alt="ICTLibraryEasy Logo" width="1150" height="175"/>
</p>
2025-12-05 15:48:50 +00:00
2026-03-06 15:04:28 +00:00
<p align="center">
A simplified MQL5 library for integrating essential ICT (Inner Circle Trader) concepts into your trading bots and expert advisors.
</p>
2025-12-06 02:42:26 +00:00
2026-03-06 15:04:28 +00:00
<p align="center">
<img src="https://img.shields.io/badge/Language-MQL5-1B6CA8?style=flat-square"/>
<img src="https://img.shields.io/badge/Platform-MetaTrader%205-0D1B2A?style=flat-square"/>
<img src="https://img.shields.io/badge/Author-nique__372%20and%20Leo-C9D6DF?style=flat-square"/>
2026-03-06 16:53:20 +00:00
<img src="https://img.shields.io/badge/version-1.18-blue"/>
2026-03-06 15:04:28 +00:00
</p>
2025-12-06 02:42:26 +00:00
2026-03-06 15:04:28 +00:00
---
## 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
```cpp
#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
```cpp
// 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
```cpp
// 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
```cpp
// 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
```cpp
// 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
├── Examples/ # Complete bot ict and comparative benchmarks with other libraries and code generated by LLM
└── Images/ # Repository banner
```
---
## Requirements
See the [requirements.txt](./requirements.txt) file.
---
## Installation
- Clone the git repository into shared projects via cmd.
- Contact me privately on MQL5 chats (user: nique_372) to be added as a collaborator with your MQL5 nickname (read-only access), which will make the repository automatically appear in your Shared Projects folder.
- Fork the repository.
---
## Disclaimer
**Trading involves substantial risk of loss.**
- This software is a technical tool, not financial advice
- Past performance does not guarantee future results
- You are solely responsible for your trading decisions
- Always test thoroughly before deploying with real capital
- Apply appropriate risk management at all times
The authors assume no liability for trading losses, system failures, or any damages arising from the use of this software.
---
2025-12-06 02:42:26 +00:00
2025-12-22 17:36:37 +00:00
## License
This repository uses a **dual licensing system**:
2025-12-22 19:59:17 +00:00
### ICT Easy Library `/Src/` + `ICTEasyLibrary.ex5`
2025-12-22 17:36:37 +00:00
- **License:** Apache 2.0 Modified
2025-12-28 23:30:40 +00:00
- **Commercial use:** Allowed in your bots
- **Selling library:** Prohibited
2025-12-22 19:10:37 +00:00
- **Details:** [LICENSE](./LICENSE.md)
2025-12-22 17:36:37 +00:00
2025-12-22 20:02:29 +00:00
> Only `/Src/` code can be modified. The compiled library (`ICTEasyLibrary.ex5`) cannot be reverse-engineered.
2025-12-22 17:36:37 +00:00
### Examples `/Examples/`
- **License:** Proprietary - Educational Use Only
2025-12-28 23:30:40 +00:00
- **Commercial use:** Prohibited to sell or derivatives
- **Learning:** Study and learn freely
2025-12-22 19:10:37 +00:00
- **Details:** [LICENSE-EXAMPLES](./LICENSE-EXAMPLES.md)
2025-12-22 17:36:37 +00:00
2026-03-06 15:04:28 +00:00
---
2025-12-06 02:42:26 +00:00
2026-03-06 15:04:28 +00:00
## Contact
2025-12-22 17:36:37 +00:00
2026-03-06 15:04:28 +00:00
- **Platform:** [MQL5 Community](https://www.mql5.com/es/users/nique_372)
- **Profile:** https://www.mql5.com/es/users/nique_372/news
2025-12-22 17:36:37 +00:00
2026-03-06 15:04:28 +00:00
---
2025-12-22 17:36:37 +00:00
2026-03-06 15:04:28 +00:00
<p align="center">Copyright © 2026 Nique-Leo.</p>