Loading…

Equity Curve Streamer

The terminal's own equity graph resets when the terminal restarts and cannot be read by anything outside MetaTrader. This EA solves both problems by sampling the account on a timer and appending one row per sample to a CSV file in the sandbox, so the history survives restarts and any external tool that can read a text file - a spreadsheet, a Python script, a web dashboard - can plot it live. Sampling runs off OnTimer, deliberately not off a counted number of ticks. A tick-counted interval drifts with how busy the symbol is: a quiet overnight session samples far less often than a volatile afternoon, and it stops sampling entirely the moment ticks stop arriving - which is exactly when a dashboard most wants confirmation that the curve is still flat, not frozen. A timer keeps sampling on the wall clock regardless of tick flow. The position count is taken across the whole account, not just the chart's own symbol, because an equity curve is an account level number - counting only one symbol's tickets would understate exposure the moment a second chart or a second EA is trading anything else. Notes and limitations One row is also written immediately on attach, so the file always has a starting point rather than staying empty until the first timer tick. The header row is written only once, the first time the file is created - if you delete the file mid-session a fresh header is written on the next sample. This EA never opens, closes or modifies a trade on either platform; it only reads and records account state.

Expert advisor · MT5 · v1.0 · Free

About Equity Curve Streamer

Equity Curve Streamer is a script for MetaTrader 5. It has 2 settings, such as Interval seconds and Csv file name. MQL source code included.

Files in the download: EquityCurveStreamer.ex5, EquityCurveStreamer.mq5, EquityCurveStreamer.txt.

Settings

SettingDefaultWhat it does
Interval seconds60Seconds between samples
Csv file nameEquityCurveStreamer.csvOutput file, in MQL5\Files

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Dashboards & Scanners · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria