Importing Tick Data into a Database and Querying It with SQL
Summary
This installment of a market simulation series explains how to turn MetaTrader 5 tick data exported as a tab-delimited CSV into a table in a MetaEditor database. It walks through creating a clean database, choosing the import option, selecting the file, setting the separator, and naming the new table. The imported table retains the CSV header as its column names, which can be adjusted before import or changed later with SQL.
The article then introduces the basic SELECT operation as a way to retrieve table contents, contrasting SQL access with spreadsheet-style views. Its evidence is a procedural walkthrough rather than a trading result or performance test. The example relies on MetaTrader 5 data and MetaEditor’s import interface, and the excerpt stops shortly after introducing SELECT, with related-table concepts such as primary and foreign keys deferred to a later installment. It teaches a practical data preparation step for simulation work, not a trading strategy or analytical method.
Key ideas
- MetaTrader 5 tick exports can be imported from a tab-delimited CSV into a MetaEditor database table.
- A clean database makes it easier to specify the name for the table created during import.
- The separator and other import settings must match the structure of the source file.
- Column names come from the CSV header and can be changed before or after import.
- The SELECT command retrieves data from a named table, while more advanced relational concepts are left for later.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.