
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Renat Fatkhullin:
Within different MQL5 Expert Advisors launched in one terminal, you can share the same database.
.
I have tested the work of two Expert Advisors with the same database in one terminal. It works without errors - both Expert Advisors write data to one file by a timer of 2 seconds.
The files are attached, they differ only in the name of the Expert Advisor.
Here is how the database looks like in MetaEditor
Is what is described for µl5 possible to use in µl4?
In MQL4 you can work with native Sqlite3_32.dll through the wrapper for MQL
This is a wrapper for MQL, do not confuse it with SQLite3Wrapper.dll
But whether it is still online, I don't know, I used to use it before.
UPD: https: //github.com/Shmuma/sqlite3-mt4-wrapperWho has figured it out, please show the implementation of such a task.
There is another nuance - saving in the database consistent data with growing value, not going scattered, such as quotes (with a growing date) - a VERY expensive operation. The tree is not balanced, one branch grows indefinitely, and the engine rebalances the tree regularly (this is worse than rubbish collection). Maybe this only applies to the indexed table, I don't remember anymore. Or maybe in the few years I haven't used it, it's already been solved. I'll have to try it out. Maybe even the developers will analyse it, they should be interested in it.
DatabaseImport()
simple script
2020.02.20 15:09:27.171 MQL5 'DOMcopy.ex5' has newer unsupported version, please update your client terminal
version 5 build 2323 latest meta-editor is the same and debugging does not work.
is something unfinished?
TheDatabaseImport function has not been released to the public yet.
Please wait for the release.
The DatabaseImport function has not yet been released to the public.
Please wait for the release.
version 5 build 2326 same thing, so wait for a stable version when?
version 5 build 2326 the same thing that is to wait for a stable version and when?
Forum on trading, automated trading systems and testing trading strategies.
New version of MetaTrader 5 build 2340: Managing account settings in the tester and expanding integration with Python
MetaQuotes, 2020.02.20 14:55
On Friday 21 February 2020, an updated version of the MetaTrader 5 platform will be released. The update contains the following changes:
In the previous platform update, we added support for working with SQLite databases directly from MQL5. Now the main functions are available through the MetaEditor user interface:
.
How it works
To quickly create databases, use the "MQL5 Wizard". Here you can immediately create the first table and define a list of its fields.
Having created a database, you will go to a new section of the "Navigator". All the work with data is performed from this section.
In the left part, the database tables are displayed. To quickly query the first 1,000 records, double-click on the table name. Here you can also create and open other databases and work with tables.
The main part of the editor is where you work with the database: fill the table with data, make searches and selections, enter SQL queries, etc.
.

For more details on working with databases in MetaTrader 5, please read the article"SQLite: Native Work with SQL Databases in MQL5"..
.
To run the script in the editor, click "Compile":
.
To work with Python, don't forget to specify the path to it in the "Settings / Compilers" section in MetaEditor. And to work with MetaTrader 5 library, install it with the command:
.
.
New command naming
Existing commands have been renamed:
MT5Shutdown -> shutdown
MT5TerminalInfo -> terminal_info
MT5Version -> version
MT5CopyRatesFrom -> copy_rates_from
MT5CopyRatesFromPos -> copy_rates_from_pos
MT5CopyRatesRange -> copy_rates_range
MT5CopyTicksFrom -> copy_ticks_from
MT5CopyTicksRange -> copy_tick_range
New commands
The list of supported commands has been greatly expanded. Added functions of trading and working with trading history, getting information about financial instruments and current account.
.
Running Python scripts on charts
Now Python scripts can be run directly on charts in the platform, similar to regular MQL5 programs. They will be displayed with special icons in the "Navigator".
.
Script messages will be displayed in the "Tools / Experts" section. If the script uses MetaTrader 5 library, it will be able to receive information about the instrument, account and trade.
Python scripts can be run on the same chart in parallel with other MQL5 scripts and Expert Advisors. To stop a script if its execution is looped, simply remove it from the chart.
Additional protection
To further protect your accounts when using third-party Python libraries, the "Disable automatic trading via external Python API" option has been added to the terminal settings.
.
Python scripts will be allowed to trade only if this option is explicitly disabled.
.
.
DatabaseImport
Imports data from a file into a table.
DatabaseExport
Exports a table or the result of SQL query execution to a CSV file. The file is created in UTF-8 encoding.
DatabasePrint
Prints a table or the result of an SQL query execution to the Expert Advisor log.
The new function will allow to implement convenient user interaction with MQL5 program.
.
.
.
General settings
In this section you can set the maximum number of open orders and positions you can have on your account at the same time. Also here you can set up the sessions when the tested program will not be allowed to trade.
Margin
Here you can fully control how the margin will be reserved and what position accounting system will be used during testing:
.
.
.
.
Commission
In this section you have full control over how commission is charged on all trades.
.
.
.
.
The update will be available through LiveUpdate system.
stable version 5 build 2340 the same DatabaseImport shows the same DatabaseImport on execution
2020.02.22 14:01:42.338 MQL5 'DOMcopy.ex5' has newer unsupported version, please update your client terminal
Hello!
I tried to create a connection to a database in the indicator, but for some reason it didn't work.
Why is it not written anywhere, in which programmes can I use databases?