Trade Cost Meter

Trade Cost Meter
Download ALL MT5 indicators (6132)
YouTube Video Thumbnail



Similar MetaTrader Tools

Trade Cost Meter

Info

The Trade Cost Meter is a Indicator for MetaTrader 5 that every trade pays the spread and often a commission. On a daily chart this is nothing, but on low timeframes the stop is small, and the same costs can take a large part of the risk of every trade.

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.


How to Install and Use Trade Cost Meter

1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.

2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.

3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.

4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.

Frequently Asked Questions

Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."

Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).

Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.

What this tool does

Every trade pays the spread and often a commission.

Typical Use Case

This Indicator excels in automated trading and technical analysis on MetaTrader 5.

Compatible Platform & Setup

This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.

Description & Settings

Related: Real-Time Broker Execution Analysis: Spread, Swap, and Cost Indicator - another powerful indicator for MetaTrader 5 traders.


Also recommended: Detecting Missing Bars in MetaTrader History Before Backtesting - similar indicator with strong performance on MetaTrader 5.


Every trade pays the spread and often a commission. On a daily chart this is nothing, but on low timeframes the stop is small, and the same costs can take a large part of the risk of every trade. A strategy that looks fine before costs can lose money after them. This indicator shows the numbers for the current symbol directly on the chart.

It measures the spread (now, average and maximum over the last ticks), adds the commission you enter, shows the swap for one night and the day of the triple swap, and calculates the cost of a round trip for 1 lot. Then, for every timeframe from M1 to D1, it compares this cost with a typical stop of N x ATR and shows which share of the risk (R) the costs take.

How to read it

Green
: costs take less than 3% of R (by default). The timeframe is cheap to trade.

Orange
: between 3% and 10% of R. Costs are noticeable; the strategy needs a real edge to pay them.

Red
: more than 10% of R. A large part of every trade goes to the broker.

Example from the picture (XAUUSD, demo account, spread 0.15): with a stop of 1.5 ATR the costs take 6.2% of R on M1, 2.4% on M5 and only 0.5% on H1. On a wider spread or with a commission the numbers on low timeframes grow quickly.

Input parameters

Commission per 1 lot per side
, in account currency (0 if your account has no commission). Brokers show it in the account conditions.

Stop distance, x ATR
(default 1.5) and
ATR period
(default 14): the typical stop used for the estimate.

Ticks for the average and maximum spread
(default 5000).

Red and green thresholds
in % of R.

Panel corner
.

Notes

Spread and swap are converted to money with the symbol's tick value, so the panel works for Forex, metals, indices and CFDs. Swaps in interest modes are shown as an approximation.

Comparing two account types of the same broker (with and without commission) is a typical use: enter the commission and look at the round-trip cost.

The panel refreshes every 5 seconds, also when there are no ticks. The indicator does not trade.

You may also like: Five-Point Retest Indicator: Automated Trade Structure Analysis - excellent alternative for indicator users on MetaTrader 5.

Source Code

#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version     "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property indicator_chart_window
#property indicator_buffers 0
#property indicator_plots   0
input double InpCommission = 0.0;
input double InpStopATR    = 1.5;
input int    InpATRPeriod  = 14;

.......

Leave your opinion, ask a question, share some knowledge

⚠ Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.