Loading…

Commission Currency Decoder

OrderCommission() always reports in the account's own deposit currency - there is nothing genuinely hidden about which currency it is in. The real unknown most traders actually face is the BASIS: does the broker charge a fixed amount per lot traded, or a flat fee per ticket regardless of size? Brokers rarely publish this clearly, and mixing the two up produces a wrong cost estimate for any position size other than the ones already traded. This script answers it from evidence rather than assumption. For every symbol, it computes both the per-lot commission and the per-trade commission across every commission-bearing closed trade, then measures how STABLE each figure is (coefficient of variation - standard deviation over the mean). A rate that stays close to constant per lot regardless of trade size points to a per-lot schedule; a rate that stays close to constant per trade regardless of lot size points to a flat per-ticket fee. Symbols where neither figure is stable are flagged as tiered or mixed rather than forced into one label. Notes and limitations Needs at least 3 trades per symbol to attempt a basis classification; fewer are reported as "insufficient data" rather than guessed at. A symbol traded with almost identical lot sizes every time cannot distinguish per-lot from flat-fee billing - both figures will look stable simultaneously, reported as "ambiguous". Zero-commission trades (some brokers waive commission on certain instruments) are counted and reported separately, not folded into the average. This reads only the account's own deposit currency figure; it does not attempt to infer or convert any other currency.

Script · MT5 · v1.0 · Free

About Commission Currency Decoder

Commission Currency Decoder is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Magic filter, Symbol filter and Export csv. MQL source code included.

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

Settings

SettingDefaultWhat it does
Magic filter-1Magic filter (-1 = all)
Symbol filterSymbol filter ("" = all)
Export csvfalseAlso write the table to a CSV file
DelimiterDelimiterCommaCSV column separator

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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria