Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Trade Journal Exporter - closed positions to CSV - script for MetaTrader 5

Dror Munk
Dror Munk
I build robust, fully-tested MetaTrader Expert Advisors and indicators in MQL5 and MQL4, with a focus on safe execution and honest validation — not just code that compiles, but code that behaves correctly under real conditions.
What you get from an order:
Views:
93
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

A trading journal is the cheapest edge there is - this script gets your raw data out of the terminal in one run.


It selects the account history for the last N days (input), walks all deals, and aggregates them into closed positions by position ID, so it is correct on both netting and hedging accounts and handles partial fills: entry and exit prices are volume-weighted across all entry and exit deals of the position.


Each CSV row contains: position ID, symbol, direction, volume, open time and volume-weighted open price, close time and volume-weighted close price, the result in points (direction-aware), commission, swap, net profit, duration in minutes, and the first deal comment (often the EA name - handy for filtering by strategy).


Inputs: period in days, file name (empty = auto TradeJournal_YYYY-MM-DD.csv), CSV separator (the default ";" opens directly in Excel), optional common-folder output, and an optional filter to the current chart symbol only.


The file is written to MQL5\Files (or the common Files folder). Positions still open, and positions whose entry lies outside the selected period, are skipped. Export only - it changes nothing on the account.



Position Size Calculator - risk-based lot sizing script Position Size Calculator - risk-based lot sizing script

Calculates the correct lot size for a planned trade from your risk (percent of equity or a fixed money amount) and stop-loss distance (points or a price level). Respects the symbol's contract specification - tick size and value, volume min/max/step - and estimates the required margin.

Spread Monitor Panel - live spread with spike alerts Spread Monitor Panel - live spread with spike alerts

On-chart panel with the live spread of the chart symbol - current, minimum, average and maximum since attach - color-coded against your warning and danger thresholds, plus an optional alert when the spread stays at the danger level for N consecutive seconds (news and rollover spikes).

Market Structure SMC: Swings, BOS/CHoCH, Order Blocks, FVG, QML Market Structure SMC: Swings, BOS/CHoCH, Order Blocks, FVG, QML

SMC/ICT market-structure indicator for MT5: swing highs/lows, BOS (continuation) and CHoCH (reversal) confirmed on close, Order Blocks, Fair Value Gaps, and QML (Quasimodo) levels. Every feature is toggle-able, with adjustable swing sensitivity and colors. Works on any symbol and timeframe.

KCI Standard: A Pure Kinematic Computing Engine for Market Singularity Detection KCI Standard: A Pure Kinematic Computing Engine for Market Singularity Detection

The Kinetic Compression Index (KCI) Standard is a high-performance, purely mathematical oscillator designed to detect extreme market exhaustion and volumetric compression points known as "Singularities." By abandoning traditional, lagging indicator handles in favor of native kinematic calculations, KCI offers unparalleled execution speed and CPU efficiency. This article details the mathematical foundation, system architecture, core code mechanics, and practical integration guides for developers looking to implement this asynchronous-proof engine into Expert Advisors and Custom Indicators.