支持中心 帮助文档 联系我们
📱 微信: 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%

SyncTradeSQL

👤 作者: Maxim Kuznetsov

4.5 分

¥0.00

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

📝 产品详情

SyncTradeSQL

作者Maxim Kuznetsov
版本v1.0
激活数2
Script for quick updates (synchronization) up-to-date data in the SQLite database. Saves open positions and orders, current quotes.

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 changes. 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 
Trade (
        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           INT ,
        'comment'       VARCHAR(255)
) WITHOUT ROWID

and

CREATE TABLE IF NOT EXISTS
Watch (
        name            VARCHAR(16) PRIMARY KEY,
        'time'          DATETIME,
        bid                     REAL,
        ask                     REAL,
        spread          INTEGER,
        stopLevel       INTEGER,
        tickValue       REAL
) WITHOUT ROWID

Using

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

For optimization, I recommend putting the db/ram directory on a ram disk

安全须知

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

EA 配置

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

📸 截图预览