> MQLArticles is not a single library: it's an ecosystem of ~13 independent modules (several used in production within the TSN ecosystem). Each folder in the table below is its own library, with its own detailed README inside the folder — this section only summarizes what each one solves.
| Module | What it solves |
|--------|--------------|
| **[Account](./Account)** | Everything about the trading account: risk management, live account status and money history — see submodules below. |
|[Account/RM](./Account/RM/README.md) | Risk management: lot size calculation, dynamic SL/TP, max loss/profit limits with automatic position closing. |
|[Account/MoneyStatus](./Account/MoneyStatus) | Live account state (balance, equity, open positions and their events) and tickets tables; the base that RM and the order utils build on. |
|[Account/MoneyHistory](./Account/MoneyHistory) | Money-history helpers: position commission, profit of a position, net profit since a date (by magic number). |
|[Account/OrderUtils](./Account/OrderUtils) | OCO (one-cancels-other) orders and an orders gestor. |
| **[PosMgmt](./PosMgmt/README.md)** | Open position management: breakeven (by fixed points, ATR or RRR), partial closes by volume, and partial closes conditioned on indicators (RSI, etc.), TrailingStop (many types, ema, ict-swing, etc..). |
| **[Strategy](./Strategy/README.md)** | Framework for building EAs by composition: chainable entry filters (RSI, Stochastic, Bands, SuperTrend...), a text-based logic rule engine, and time filters (day/year). |
| **[Utils](./Utils/README.md)** | Core of cross-cutting utilities used by the rest of the ecosystem — see submodules below. |
| [Utils/LogFile](./Utils/LogFile/README.md) | File logging system (work in progress). |
| **[IndicatorsCts](./IndicatorsCts/README.md)** | Generic wrapper for consuming technical indicators with a reusable instance pool. |
| **[Ob](./Ob/README.md)** | Order Blocks indicator + example EAs that consume it (published articles); `Ob/Indicator/EaCommon.mqh` holds the pieces shared by those EAs (indicator resource, inputs, helper functions). |
| **[Examples](./Examples)** | Working EAs/scripts that put the libraries above into practice (breakeven panel, risk management panel, lot size / SL test scripts). |
| **[MqlCompilerBugs](./MqlCompilerBugs)** | Minimal reproductions of MQL5 compiler bugs found while building this ecosystem, each with its own README. |
| **[Sets](./Sets)** | `.set` preset files used by published articles (currently the partial-close article, #19682).
> Code snippets for each module (with real usage examples) now live in that folder's own README — this root README is the ecosystem map, not the class catalog.
| **Part 2** | Lot size calculation | [[EN]](https://www.mql5.com/en/articles/16985) |
| **Part 3** | Base class construction | [[EN]](https://www.mql5.com/en/articles/17249) |
| **Part 4** | Completing key functions of the CRiskManagement class | [[EN]](https://www.mql5.com/en/articles/17508) |
| **Part 5** | Integrating risk management into an EA (Order Block) | [[EN]](https://www.mql5.com/en/articles/17640) |
### Position Management - Breakeven
| Part | Focus | Article Link |
|-------|---------|-------------------|
| **Part 1** | Base class and breakeven by fixed points | [[EN]](https://www.mql5.com/en/articles/17957) |
| **Part 2** | Breakeven by ATR and RRR | [[EN]](https://www.mql5.com/en/articles/18111) |
### Position Management - Partial Closes
| Focus | Article Link |
|-------|--------------------|
| Implementation of partial closes in MQL5 | [[EN]](https://www.mql5.com/en/articles/19682) |
### Position Management - Conditional partial closure
| Focus | Article Link |
|-------|--------------------|
| Implementation of the base class in MQL5 | [[ES]](https://www.mql5.com/es/articles/20048) |
### Order Block Indicator
| Part | Focus | Article Link |
|-------|---------|-------------------|
| **Part 1** | Initial implementation of Order Blocks in an indicator | [[EN]](https://www.mql5.com/en/articles/15899) |
| **Part 2** | Signal implementation in the Order Block indicator | [[EN]](https://www.mql5.com/en/articles/16268) |
> **Warning:** The articles are outdated with respect to the current state of the libraries (some libraries have been significantly updated, while others have had their architecture completely changed or have been rebuilt).
---
## License
**[Read Full License](./LICENSE)**
By downloading or using this repository, you accept the license terms.
---
## Requirements
See the [dependencies.json](./dependencies.json) file.
- Using the `tsndep` command requires the `tsndep` package (available on [PyPI](https://pypi.org/project/tsndep)). This command automatically downloads all dependencies and installs every requirement from the repositories.
- If any part of the system is private, the install will fail. Contact me so I can grant you access (if it's a product, you can purchase it; if you have any questions, don't hesitate to reach out). Check the dependencies.json file for more info.