Discussion of article "How to connect MetaTrader 5 to PostgreSQL"

 

New article How to connect MetaTrader 5 to PostgreSQL has been published:

This article describes four methods for connecting MQL5 code to a Postgres database and provides a step-by-step tutorial for setting up a development environment for one of them, a REST API, using the Windows Subsystem For Linux (WSL). A demo app for the API is provided along with the corresponding MQL5 code to insert data and query the respective tables, as well as a demo Expert Advisor to consume this data.

MetaTrader 5 already has the functions you may need to work with a database and the functions you may need to connect to a database via network.

Since 2020 the platform provides native integration with SQLite. You can use those database functions mentioned above to interact with it from code. Besides that you can interact with your databases via a dedicated GUI in MetaEditor, making it easy to create tables, alter tables, and perform CRUD operations without the need for additional software.

That was a great improvement in the end-user experience and a key addition to the MQL5 developer arsenal.

Among dozens of RDBMS available, many of them with open-source licenses, SQLite seems to have been a smart choice by MetaTrader 5 developers. Despite being a full-featured SQL database, with multi-column indexes, triggers, views, acid transactions, full-text search, aggregate functions, and more, it is lightweight, file-based, scalable, and requires zero maintenance. According to its website, "it seems likely that there are over one trillion (1e12) SQLite databases in active use".

Regardless of its impressive features, SQLite is limited by design to a single user and is not aimed at concurrent access in web deployments. The large number of forum posts and articles on the MQL5 website about how to connect MetaTrader 5 to MySQL reveals that there is a demand for a more robust solution for other use cases.

This article is focused on setting up a development environment for these use cases using Postgres.

Author: Jocimar Lopes

 

Playing CarX Street with the mod APK has made the game even more addictive. The modded version unlocks exclusive events, rewards, and achievements, making it hard to put the game down.

https://carxstreet.pro

 
Hay Day #:

Playing CarX Street with the mod APK has made the game even more addictive. The modded version unlocks exclusive events, rewards, and achievements, making it hard to put the game down.

https://carxstreet.pro

SPAM - This is spam...
Reason: