Alım-satım robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Telegram üzerinde bulun!
Fan sayfamıza katılın
Kodu ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Kodu beğendiniz mi? MetaTrader 5 terminalinde deneyin
Komut dosyaları

Trade Cost Report: Commission, Swap and Fees per Symbol - MetaTrader 5 için komut dosyası

The Dam Phan
The Dam Phan
I build and test MetaTrader 5 Expert Advisors, with one focus: finding out whether a strategy still works after real trading costs, before you risk money on it.
What I do
• Custom MT5 EAs and indicators from your rules or specification (MQL5, clean commented source code).
Görüntülemeler:
65
Derecelendirme:
(1)
Yayınlandı:
MQL5 Freelance Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

When a strategy is close to break-even, costs decide whether it makes or loses money. This script reads the deal history of the account and separates the gross trading result from the costs charged by the broker: commission, swap and fees.

How it works

  • Selects the account history for the chosen number of days (or all history).
  • Optionally filters by magic number (0 = manual trades).
  • Per symbol: closed trades, lots opened, gross profit, commission, swap, fees, net result, and the share of the gross result taken by costs.
  • Adds a TOTAL row, prints the table to the Experts log, shows it on the chart and saves a CSV file.
  • Works on hedging and netting accounts (reversal deals are counted).

Inputs

  • InpDays - days of history, 0 = all history (default 90).
  • InpMagic - only this magic number, -1 = all trades, 0 = manual trades (default -1).
  • InpSaveCsv - save the results to MQL5\Files\TradeCostReport.csv (default true).

Notes

The spread is already inside the trade prices, so it is part of the gross figure. Use the report together with a spread measurement (for example by hour of day) to see the full cost picture. The image shows the output on a demo account with a few test trades.

TradeCostReport output on a demo account

Risk Calculator - lot size by risk percent and ATR stop Risk Calculator - lot size by risk percent and ATR stop

On-chart panel that sizes your trade: lot size from your risk % and a stop in points or ATR, with spread, broker-minimum, minimum-lot and margin checks. Calculation only - it never trades.

Symbol and Trading Conditions Inspector Symbol and Trading Conditions Inspector

Displays live symbol specifications, broker trading conditions, account information, spread, trading permissions, session status and margin properties directly on the MT5 chart.

Prop Firm Risk Headroom Monitor Prop Firm Risk Headroom Monitor

Account-wide MT5 prop firm risk monitor that tracks daily and maximum loss headroom, current stop-loss exposure, projected equity and remaining risk capacity.

Asia Session Range and Liquidity Sweep Zones (BSL/SSL) with Live HUD Asia Session Range and Liquidity Sweep Zones (BSL/SSL) with Live HUD

Plots daily Asia Session High/Low range boxes, extends session liquidity levels through London and New York sessions, and marks non-repainting closed-bar liquidity sweeps (BSL/SSL) with a live HUD.