true-trading-cost-net-rr/README.md

True Trading Cost & Net Risk/Reward — MetaTrader 4 and 5

A free, source-available chart planning indicator for discretionary Forex and CFD traders. It estimates the financial impact of a proposed trade before an order is placed, including broker spread, configured commission, expected slippage, optional overnight swap, position size, break-even and net risk-to-reward.

Developed and maintained by FOREXREVIEW.TOP. The indicator is a planning tool, not an Expert Advisor, trading signal or automated execution system.

Get started

Version Source in this repository Free MQL5 Code Base download
MetaTrader 4 (MQL4) TrueTradingCostNetRR_MT4.mq4 Code Base #79600
MetaTrader 5 (MQL5) TrueTradingCostNetRR_MT5.mq5 Code Base #79598

Full illustrated guide: True Trading Cost MT4 & MT5 — Net Risk/Reward (ForexReview.top).

What it does

  • Trade planning on the chart: choose a hypothetical BUY or SELL; drag the blue Entry, red Stop and green Target levels. The buttons do not send orders.
  • Risk-aware lot sizing: use a percentage of account equity or a fixed lot. Risk-based lots are rounded down to the permitted broker volume grid.
  • Realistic price-side modeling: BUY enters at Ask and exits at Bid; SELL enters at Bid and exits at Ask. Spread is therefore embedded in the executable-price difference and not charged twice.
  • Gross versus net R:R: compare the pre-cost financial target/risk against estimates including round-trip commission, extra fees and assumed slippage.
  • Break-even estimate: display the execution-side price needed to recover configured add-on costs.
  • Optional overnight projection: swap Off / Auto / Manual, with explicit calendar verification before costs are included in net R:R.
  • Session spread observations: four six-hour groups by broker-server time, using fresh tick timestamps only. Values are kept in memory, not a historical database.
  • Clear limitations: flag missing broker tick values, stale quotes, unverified commissions and manual contract-specification simulations.

MT5 on-chart dashboard

MT5 screenshot from a chart test. The test's manual-symbol specifications are illustrative, not a broker-verified live quote.

Installation

  1. Open File → Open Data Folder in MetaTrader.
  2. For MT4, copy MQL4/Indicators/TrueTradingCostNetRR_MT4.mq4 to the terminal's MQL4/Indicators/ folder. For MT5, copy MQL5/Indicators/TrueTradingCostNetRR_MT5.mq5 to MQL5/Indicators/.
  3. Open the source in MetaEditor and press F7 to compile. Refresh the Navigator's Indicators list.
  4. Add the indicator to a demo chart. Enter verified broker fees (the commission input is round trip per one lot in the account deposit currency), then adjust the three price lines.

Alternatively, install the already-published free source directly from the MQL5 Code Base using the links above.

How the estimate works

Gross risk per lot   = |Entry - Stop|   / PriceTickSize × LossTickValue
Gross reward per lot = |Target - Entry| / PriceTickSize × ProfitTickValue
Add-on cost per lot  = RoundTripCommission + ExtraFees + AssumedSlippage
Net risk             = GrossRisk + AddOnCosts + max(0, -Swap) [if swap included]
Net reward           = GrossReward - AddOnCosts + Swap         [if swap included]
Net R:R              = NetReward / NetRisk

The MT5 version can use separate broker profit/loss tick values. MT4 exposes a single tick value; verify its units and account-currency conversion, especially for unusual CFDs. The project deliberately does not estimate free-margin requirements or check whether a broker would accept a given stop distance.

Validation and scope

Both platform sources passed their respective MQL5 Code Base automated validators with zero errors on November 16, 2026. The initial MT4 validation required adding #property strict, which is present in the source here. These automated checks are useful but are not a guarantee of matching actual fills, swap, commission or slippage at every broker.

See validation notes for scenarios and outstanding real-broker checks.

Documentation and contact

ForexReview.top provides broker research, account comparison and trading-cost education. The indicator walkthrough explains setup and interpretation for non-programmers.

Author profile: fxliner on MQL5. For implementation questions, open an issue or consult the Code Base pages.

Disclaimer: This project does not create trading signals or place trades. Costs and hypothetical P/L depend on market quotes and broker contract specifications; independently verify before trading. © 2026 FOREXREVIEW.TOP.