支持中心 帮助文档 联系我们
📱 微信: 18391752892 | 💬 QQ: 3313198376 | ✈️ Telegram | 📧 fishfx123@gmail.com
EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34% EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34%

SyncHistorySQL

👤 作者: Maxim Kuznetsov

4.5 分

¥0.00

📌 版本: v1.0
📥 下载: 0
⭐ 评分: 4.5

📝 产品详情

SyncHistorySQL

作者Maxim Kuznetsov
版本v1.0
激活数78603
Script for quick updates (synchronization) trade history in the SQLite database. Saves closed positions and orders, symbols data.

Take advantage of SQLite's capabilities for intermediate data storage, analytics, and integrations of the MetaTrader platform. Keep all your data in one place.

Use the saved data in SQL analytical queries, from Python and other languages, to build dashboards

Parameters

  • useDefaults true - use default parameters. Save data to the COMMON hierarchy, to the db/ram/{server_name} directory.{account number}.trade.db

you can specify useDefaults=false and set your own save options:

  • useCommon - use the COMMON hierarchy or the data directory of the current terminal
  • useFolder - directory to save the database
  • useFilename - the name of the database inside the directory

Database schema

The database contains the necessary minimum, in the style of mt4 and adapted for frequent inserts. After creating the database with the script, you can make your own adjustments to it (add indexes, computable fields, additional data and tables)

CREATE TABLE IF NOT EXISTS 
History (
        ticket          INT PRIMARY KEY,
        symbol          VARCHAR(16),
        'type'          VARCHAR(16),
        lots            REAL,
        openPrice       REAL,
        stopLoss        REAL,
        takeProfit      REAL,
        price           REAL,
        'time'          DATETIME,
        closeTime       DATETIME,
        expiration      DATETIME,
        profit          REAL,
        swap            REAL,
        commission      REAL,
        magic           INTEGER,
        'comment'       VARCHAR(255)
) WITHOUT ROWID;

and

CREATE TABLE IF NOT EXISTS 
Symbol (
        name    VARCHAR(16) PRIMARY KEY,
        base    VARCHAR(16),
        quote   VARCHAR(16),
        digits  INTEGER,
        point           REAL,
        tickSize        REAL,
        minLot          REAL,
        maxLot          REAL,
        lotStep         REAL
) WITHOUT ROWID

Using

Just run the script when you need to get the data.


安全须知

本产品仅通过 MQL5.com 官方渠道获取。其他渠道版本可能缺少完整功能和技术支持。

EA 配置

交易品种XAUUSD
时间框架H1 (推荐)
推荐经纪商IC Markets, IC Trading
最低存款$300 / 0.01手

📸 截图预览