joaopedrodev
joaopedrodev
joaopedrodev
已发布文章Simplifying Databases in MQL5 (Part 2): Using metaprogramming to create entities
Simplifying Databases in MQL5 (Part 2): Using metaprogramming to create entities

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 for efficient data manipulation by the ORM, without having to write SQL manually.

1
joaopedrodev
已发布文章Simplifying Databases in MQL5 (Part 1): Introduction to Databases and SQL
Simplifying Databases in MQL5 (Part 1): Introduction to Databases and SQL

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 access, paving the way for the discussion of ORM, where we'll build one in MQL5.

2
joaopedrodev
已发布代码Logify - Library for log management
Logify 是 MQL 的日志库,旨在简化 EA 和指标的调试、跟踪和监控。它直接在图表或终端上提供结构化、可定制和有组织的日志,支持日志级别、灵活格式和多个处理程序。这是一个轻量级、优雅的解决方案,可轻松集成到您的 MQL 项目中。
· 1 241 174
joaopedrodev
已发布文章Mastering Log Records (Part 10): Avoiding Log Replay by Implementing a Suppression
Mastering Log Records (Part 10): Avoiding Log Replay by Implementing a Suppression

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 to ensure robustness and flexibility in log capture during bot or indicator development.

joaopedrodev
已发布文章Mastering Log Records (Part 9): Implementing the builder pattern and adding default configurations
Mastering Log Records (Part 9): Implementing the builder pattern and adding default configurations

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 configuration. It also covers tweaks for MetaTrader 5 build 5100.

2
joaopedrodev
已发布文章Mastering Log Records (Part 8): Error Records That Translate Themselves
Mastering Log Records (Part 8): Error Records That Translate Themselves

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 severity level. All of this with a clean, extensible, and production-ready design.

joaopedrodev
已发布文章Mastering Log Records (Part 7): How to Show Logs on Chart
Mastering Log Records (Part 7): How to Show Logs on Chart

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.

2
joaopedrodev
已发布文章精通日志记录(第六部分):数据库日志存储方案
精通日志记录(第六部分):数据库日志存储方案

本文探讨如何利用数据库以结构化、可扩展的方式存储日志。内容涵盖基础概念、核心操作、MQL5中数据库处理器的配置与实现。最后验证结果,并阐述该方法在优化与高效监控方面的优势。

joaopedrodev
已发布文章精通日志记录(第五部分):通过缓存和轮转优化处理程序
精通日志记录(第五部分):通过缓存和轮转优化处理程序

本文通过为处理器添加格式化器、引入用于管理执行周期的 CIntervalWatcher 类、以及采用缓存和文件轮转进行优化,并辅以性能测试和实际示例,从而改进了该日志库。通过这些改进,我们确保了一个高效、可扩展且能适应不同开发场景的日志系统。

joaopedrodev
已发布文章精通日志记录(第四部分):将日志保存到文件
精通日志记录(第四部分):将日志保存到文件

在本文中,我将向您讲解基本的文件操作,以及如何配置一个灵活的自定义处理器。我们将更新 CLogifyHandlerFile 类,以将日志直接写入文件。我们将通过在 EURUSD 上模拟一周的策略来进行性能测试,在每个 tick 生成日志,总耗时为 5 分 11 秒。其结果将在未来的文章中进行比较,届时我们将实现一个缓存系统来提升性能。

joaopedrodev
已发布文章日志记录精通指南(第三部分):探索日志处理器(Handlers)实现方案
日志记录精通指南(第三部分):探索日志处理器(Handlers)实现方案

在本文中,我们将探索日志库中"处理器"(handlers)的概念,理解其工作原理,并创建三种基础实现:控制台、数据库和文件。我们将覆盖从处理器的基本结构到实际测试,为后续文章中的完整功能实现奠定基础。

joaopedrodev
已发布文章《精通日志记录(第二部分):格式化日志》
《精通日志记录(第二部分):格式化日志》

在本文中,我们将探讨如何在类库中创建和应用日志格式化工具。我们将从格式化工具的基本结构讲起,一直到样例的实现。到本文结束时,您将掌握在该库中格式化日志的必要知识,并理解其背后的工作原理。

joaopedrodev
已发布文章精通日志记录(第一部分):MQL5中的基础概念与入门步骤
精通日志记录(第一部分):MQL5中的基础概念与入门步骤

欢迎开启另一段探索之旅!本文是一个特别系列的开篇之作,我们将逐步创建一个专为MQL5语言开发者量身定制的日志操作库。

joaopedrodev
已发布文章Connexus观察者模式(第8部分):添加一个观察者请求
Connexus观察者模式(第8部分):添加一个观察者请求

在本系列文章的最后一篇中,我们探讨了观察者模式(Observer Pattern) 在Connexus库中的实现,同时对文件路径和方法名进行了必要的重构优化。该系列文章完整地记录了Connexus库的开发过程——这是一个专为简化复杂应用中的HTTP通信而设计的工具库。

joaopedrodev
已发布文章Connexus客户端(第七部分):添加客户端层
Connexus客户端(第七部分):添加客户端层

在本文中,我们将继续开发connexus库。在本章节中,我们将构建CHttpClient类,该类负责发送请求并接收指令。我们还将介绍模拟对象(mocks)的概念,让该库与WebRequest函数解耦,从而为用户提供更强大的灵活性。

joaopedrodev
已发布文章Connexus请求解析(第六部分):创建HTTP请求与响应
Connexus请求解析(第六部分):创建HTTP请求与响应

在Connexus库系列文章的第六篇中,我们将聚焦于完整的HTTP请求,涵盖构成请求的各个组件。我们将创建一个表示整个请求的类,这将有助于将之前创建的各个类整合在一起。

joaopedrodev
已发布文章Connexus助手(第五部分):HTTP方法和状态码
Connexus助手(第五部分):HTTP方法和状态码

在本文中,我们将了解HTTP方法和状态码,这是网络上客户端与服务器之间通信的两个非常重要的部分。了解每种方法的作用,可以让您更精确地发出请求,告知服务器您想要执行的操作,从而提高效率。

joaopedrodev
已发布文章Connexus中的正文(第四部分):添加HTTP请求正文
Connexus中的正文(第四部分):添加HTTP请求正文

在本文中,我们探讨了HTTP请求中的正文概念,这对于发送诸如JSON和纯文本之类的数据至关重要。我们讨论并解释了如何正确地使用正文,并结合适当的头部信息。此外,我们还介绍了Connexus库中的ChttpBody类,它将简化对请求正文的处理。

joaopedrodev
已发布文章Connexus的头(第三部分):掌握HTTP请求头的使用方法
Connexus的头(第三部分):掌握HTTP请求头的使用方法

我们继续开发Connexus库。在本章中,我们探讨HTTP协议中请求头的概念,解释它们是什么、它们的用途以及如何在请求中使用它们。我们将涵盖用于与API通信的主要头信息,并展示了如何在库中配置它们的实例。

joaopedrodev
已发布文章HTTP和Connexus(第2部分):理解HTTP架构和库设计
HTTP和Connexus(第2部分):理解HTTP架构和库设计

本文探讨了HTTP协议的基础知识,涵盖了主要方法(GET、POST、PUT、DELETE)、状态码以及URL的结构。此外,还介绍了Conexus库的构建起点,以及CQueryParam和CURL类,这些类用于在HTTP请求中操作URL和查询参数。

12