Codes

Logify - Library for log management for MetaTrader 5

Logify is a logging library for MQL designed to simplify debugging, tracking, and monitoring of EAs and indicators. It provides structured, customizable, and organized logs directly on the chart or in the terminal, with support for log levels, flexible formats, and multiple handlers. A lightweight

Articles

Simplifying Databases in MQL5 (Part 2): Using metaprogramming to create entities for MetaTrader 5

We explored the advanced use of #define for metaprogramming in MQL5, creating entities that represent tables and column metadata (type, primary key, auto-increment, nullability, etc.). We centralized these definitions in TickORM.mqh, automating the generation of metadata classes and paving the way

Simplifying Databases in MQL5 (Part 1): Introduction to Databases and SQL for MetaTrader 5

We explore how to manipulate databases in MQL5 using the language's native functions. We cover everything from table creation, insertion, updating, and deletion to data import and export, all with sample code. The content serves as a solid foundation for understanding the internal mechanics of data

Mastering Log Records (Part 10): Avoiding Log Replay by Implementing a Suppression for MetaTrader 5

We created a log suppression system in the Logify library. It details how the CLogifySuppression class reduces console noise by applying configurable rules to avoid repetitive or irrelevant messages. We also cover the external configuration framework, validation mechanisms, and comprehensive testing

Mastering Log Records (Part 9): Implementing the builder pattern and adding default configurations for MetaTrader 5

This article shows how to drastically simplify the use of the Logify library with the Builder pattern and automatic default configurations. It explains the structure of the specialized builders, how to use them with smart auto-completion, and how to ensure a functional log even without manual

Mastering Log Records (Part 8): Error Records That Translate Themselves for MetaTrader 5

In this eighth installment of the Mastering Log Records series, we explore the implementation of multilingual error messages in Logify, a powerful logging library for MQL5. You’ll learn how to structure errors with context, translate messages into multiple languages, and dynamically format logs by

Mastering Log Records (Part 7): How to Show Logs on Chart for MetaTrader 5

Learn how to display logs directly on the MetaTrader chart in an organized way, with frames, titles and automatic scrolling. In this article, we show you how to create a visual log system using MQL5, ideal for monitoring what your robot is doing in real time

Mastering Log Records (Part 6): Saving logs to database for MetaTrader 5

This article explores the use of databases to store logs in a structured and scalable way. It covers fundamental concepts, essential operations, configuration and implementation of a database handler in MQL5. Finally, it validates the results and highlights the benefits of this approach for

Mastering Log Records (Part 5): Optimizing the Handler with Cache and Rotation for MetaTrader 5

This article improves the logging library by adding formatters in handlers, the CIntervalWatcher class to manage execution cycles, optimization with caching and file rotation, performance tests and practical examples. With these improvements, we ensure an efficient, scalable and adaptable logging

Mastering Log Records (Part 4): Saving logs to files for MetaTrader 5

In this article, I will teach you basic file operations and how to configure a flexible handler for customization. We will update the CLogifyHandlerFile class to write logs directly to the file. We will conduct a performance test by simulating a strategy on EURUSD for a week, generating logs at each

Mastering Log Records (Part 3): Exploring Handlers to Save Logs for MetaTrader 5

In this article, we will explore the concept of handlers in the logging library, understand how they work, and create three initial implementations: Console, Database, and File. We will cover everything from the basic structure of handlers to practical testing, preparing the ground for their full