True Trading Cost – Net Risk Reward Calculator is a free, source-included indicator for MetaTrader 4 and MetaTrader 5, published by developer fxliner in the MQL5 Code Base. It lets discretionary traders map entry, stop and target prices directly onto a chart, then estimate the monetary risk and reward after relevant trading costs.

Crucially, this is a trade-planning indicator, not an Expert Advisor or a buy/sell signal generator. Its BUY, SELL and RESET controls set up hypothetical plans; they do not submit orders to a broker.

Featured image: AI-generated editorial mockup illustrating the True Trading Cost calculator in use. The interface and figures are conceptual, not a verified MetaTrader screenshot or live broker data.

What does True Trading Cost actually do?

The indicator bridges two parts of trade preparation that are often treated separately: technical price levels and the financial consequences of executing a position. You supply or adjust entry, stop-loss and profit-target levels. The calculator translates those price distances into account-currency amounts using the symbol’s tick size, tick value and the chosen trade volume, then makes cost-adjusted estimates.

For a scalper working with relatively small targets, a few dollars in fees can represent a meaningful portion of expected reward. A day trader may care more about sizing a position within a defined percentage of equity. A swing trader must also consider overnight charges and rollover rules. None of these workflows requires the calculator to predict where the market will move.

Conceptual True Trading Cost trade planning dashboard TRADE PLANNING / EURUSDConcept illustration — not a MetaTrader screenshot True Trading Cost Spread (informational)Round-trip commissionOther costs + slippageNet riskNet rewardNet R:R 0.8 pip$7.00$3.00$260$4901 : 1.88 TARGETENTRYSTOP
Illustrative mockup of the planning workflow, with entry, stop, target and estimated costs. Not an actual platform screenshot or live broker data. On mobile, scroll sideways to view the complete diagram.

Key features and how they work

1. Drag-and-drop entry, stop and target levels

The planner uses three chart lines: blue for Entry, red for Stop and green for Target. Select BUY or SELL to initialize a hypothetical trade, then move any line to recalculate distances, monetary outcomes, break-even and the net risk-to-reward ratio. RESET restores initial levels using the latest Bid/Ask and ATR(14) from the last closed bar.

ATR, or Average True Range, supplies a volatility-based starting reference for the initial stop distance. That is a planning convenience, not an instruction to use the suggested level without examining market structure.

2. Gross risk versus net risk

Gross risk is the estimated loss between the planned executable entry and stop-exit prices, before separately modeled charges. Net risk adds applicable round-trip commissions, other fees and estimated slippage, along with negative swap when explicitly enabled under the tool’s rules. The difference matters when a strategy relies on a strict account-risk budget.

3. Gross reward, net reward and net R:R

Gross reward measures the planned gain from entry to target, before separate charges. Net reward deducts those charges and accounts for eligible estimated swap when the broker calendar has been verified. The main comparison is Net R:R = Net Reward ÷ Net Risk. In a conventional reward-to-risk format, a result of 1.88 means an estimated $1.88 of net reward for each $1 of modeled net risk—not a forecast of the likelihood of success.

4. Break-even exit price

A position can return to the original entry price and still lose money after commission and other fees. The indicator displays an estimated break-even exit level intended to offset the costs included in the plan. It does not modify a live stop-loss order or manage an open position.

5. Risk-based lot sizing and fixed-lot mode

In risk-based sizing mode, you specify a percentage of account equity. The calculator uses the cost-adjusted risk to suggest a volume that fits the resulting budget, rounding down to the broker’s permitted lot increment. If the minimum permitted volume would exceed the budget, the tool offers no position-size suggestion rather than quietly raising the risk. Fixed-lot mode lets you evaluate a particular trade volume instead.

6. Commission, extra fees and slippage inputs

The commission input is the round-trip amount per standard lot, denominated in the account currency. If a broker charges $3.50 per lot at entry and another $3.50 at exit, enter $7.00—not $3.50. Additional fees should represent costs not already included in that commission. Slippage is an assumption for potential execution differences; the actual value is unknown until a trade is filled.

For a closer look at this distinction, read our guide to per-side versus round-turn forex commissions.

7. Optional overnight swap estimates

The second panel includes swap estimates with three sources: OFF, AUTO and MANUAL. Settings also cover the expected number of rollover days, a manually entered swap per lot per night, triple-swap weekday and a verified rollover calendar. Negative swap can add to modeled risk when enabled; treatment of estimated swap on the reward side is conditional on the calendar being verified.

Automatic support differs by platform. On MT4 it primarily covers points-based swaps where the broker’s tick-size unit can be interpreted correctly. MT5 supports several additional broker modes, including deposit-currency swap and certain compatible currency cases. Unsupported modes require manual values. Actual financing depends on the broker, account, rollover cutoff, holidays and future rate changes. For context, see our explanation of swap fees and triple-swap days.

8. Intraday spread observations

An optional Insights panel collects the minimum, average and maximum observed spread in four six-hour blocks of broker-server time: 00:00–06:00, 06:00–12:00, 12:00–18:00 and 18:00–24:00. Samples come only from distinct incoming tick timestamps after the indicator starts; stale quotes are excluded. Statistics live in memory and reset daily or when the indicator is removed.

This is useful as a short-term observation aid, but it is not a broker-wide historical spread database. A thin sample from one session should not be mistaken for a representative long-term average.

Why the indicator does not charge the spread twice

This is one of the most important details in the calculation model. For a planned BUY, entry is modeled at Ask and the exit at Bid. For SELL, the entry is at Bid and the exit at Ask. That executable-price difference already incorporates the entry spread.

The dashboard may still display the spread and its cash-equivalent value as useful context, but it does not add that amount again to net profit or loss. Doing so would double-count the spread and overstate trading costs.

Gross monetary risk and reward use the entry-to-exit price distance, contract tick size and broker-reported tick value. MetaTrader 5 provides profit/loss tick-value information; MetaTrader 4 supplies one tick value for both directions. Broker contract specifications and currency conversions therefore remain essential inputs, particularly for CFDs and instruments with nonstandard contract sizes.

Worked example: how 2:1 becomes roughly 1.88:1

Consider a hypothetical EURUSD BUY in a USD-denominated account. Assume the entry is 1.10000 at Ask, the stop exit is 1.09750 at Bid (25 pips away), and the target exit is 1.10500 at Bid (50 pips away). For illustration, one lot has a pip value of $10. The plan is intraday, so no swap is included.

Illustrative input Value
Account equity $10,000
Maximum risk percentage 1%
Gross stop distance / target distance 25 pips / 50 pips
Round-trip commission per lot $7.00
Additional fee per lot $1.00
Estimated total slippage 0.2 pip = $2.00 per lot
Swap $0.00 (intraday assumption)

At one lot, the gross stop-distance risk is 25 × $10 = $250, while gross reward is 50 × $10 = $500. That produces a gross reward-to-risk ratio of 2:1. The additional modeled charges total $7 + $1 + $2 = $10. Because the executable Bid/Ask prices already reflect spread, the displayed spread is not added to that $10.

Result per one lot Illustrative amount
Gross risk $250.00
Gross reward $500.00
Separately modeled costs $10.00
Net risk $260.00
Net reward $490.00
Net reward-to-risk 490 ÷ 260 ≈ 1.88:1

This is not an example of a real broker quote or an observed trade result. Its purpose is to illustrate how the relationship between potential reward and risk changes when relevant costs are included.

Gross versus net risk reward after trading costs FROM GROSS R:R TO NET R:RIllustrative EURUSD calculation — one lot, USD-denominated account GROSSRisk $250Reward $500R:R 1 : 2.00EXTRA COSTSCommission $7Other $1 + slippage $2Total $10NETRisk $260Reward $490R:R 1 : 1.88 Equity $10,000 × risk 1% = $100 risk budgetIllustrative position size: 0.38 lot → estimated net risk $98.80
Illustrative figures, not measured broker prices. Bid/Ask execution assumptions already reflect spread; it is not charged twice. Slippage is an estimate. Scroll horizontally to read the diagram on smaller screens.

Position sizing with a 1% equity risk limit

With $10,000 in equity and a 1% risk cap, the trade budget is $100. At an estimated $260 net risk per full lot, the theoretical volume is $100 ÷ $260 = 0.3846 lot. If the broker allows 0.01-lot increments, the suggestion rounds down to 0.38 lot.

At 0.38 lot, the modeled net risk is $98.80 and modeled net reward is $186.20. Actual costs, the final fill and any unexpected price gaps could alter those numbers. The calculator helps structure the decision; it cannot guarantee a maximum realized loss.

How to download, install and use the MT4 or MT5 version

  1. Download the correct source file. Use True Trading Cost for MetaTrader 4 (the .mq4 version) or True Trading Cost for MetaTrader 5 (the .mq5 version) from the developer’s MQL5 Code Base listings.
  2. Open the terminal’s Data Folder. In desktop MetaTrader, select File → Open Data Folder, then use MQL4/Indicators for MT4 or MQL5/Indicators for MT5.
  3. Copy and compile the file. Open the source in MetaEditor and compile it. Check for compiler errors, and refresh the Navigator’s Indicators list if the new indicator is not visible.
  4. Attach it to the instrument chart. Review the account currency, symbol specifications, verified round-trip commission, extra fees and the slippage assumptions before interpreting monetary results.
  5. Press BUY or SELL for a plan. Move the blue Entry, red Stop and green Target lines to the intended levels.
  6. Review the dashboard. Compare gross and net risk/reward, break-even, suggested lot size and cost-to-target warnings. RESET can initialize a new hypothetical plan.

Nothing in these steps constitutes an order. Check available margin, the broker’s stop-distance rules and order acceptance separately before placing any live trade.

Important settings and the MT4/MT5 differences

Setting group Key inputs Purpose
Sizing InpSizing, InpRiskPercent, InpFixedLots Risk-percent or fixed-volume planning
Costs InpCommissionRoundTurnPerLot, InpCommissionVerified, InpExtraFeesRoundTurnPerLot Commission and additional charges
Slippage and alerts InpSlippageRoundTurnPoints, InpWarnCostTargetPercent Slippage assumption and cost warning threshold
Initial levels InpInitialStopATRMultiplier, InpInitialTargetRR, InpFallbackStopPoints Initial stop distance and target ratio
Display InpPanelX, InpPanelY, InpShowBreakEvenLine, InpUpdateSeconds, InpShowInsightsPanel Dashboard placement and refresh settings
Swap InpSwapSource, InpRolloverDays, InpManualSwapPerLotNight, InpTripleSwapWeekday, InpSwapCalendarVerified, InpIncludeSwapInNetRR Optional rollover modeling and validation
Spread observations InpCollectSpreadStats Enable spread sample collection
Offline simulation InpUseManualSymbolSpecs and InpManual... inputs Manual contract assumptions for testing only

Both versions support the same core planning workflow. The MT4 release also provides InpMT4TickSizeUnit (AUTO, POINTS or PRICE) to handle broker tick-size unit interpretation. The MT5 release can use separate tick values for profit and loss as reported by the broker and supports additional automatic swap models. Manual symbol-specification mode is available when tick values or equity are invalid, but it is explicitly a simulation—not evidence of actual broker costs.

Limitations traders should not overlook

The indicator cannot know future slippage, account-specific commissions that have not been entered correctly, or unexpected overnight financing changes. A position’s actual entry or exit may differ from the planned prices. Currency conversion and tick values can also depend on the broker’s symbol specifications.

It does not check free margin, broker minimum stop levels or whether an order will be accepted. The spread observations are held in memory and do not establish long-term execution quality. According to the developer’s description, the indicator does not place automated orders, use an EA, load DLLs or make network requests.

For these reasons, treat the display as a pre-trade estimate, not a prediction, guaranteed outcome or substitute for your broker’s contract specifications and transaction history.

Is True Trading Cost worth adding to your chart?

If you already have a method for selecting entries and exits, True Trading Cost can make the next decision more transparent: whether the trade still makes sense after its likely costs, and whether the position size stays within your chosen equity-risk limit. Its main benefit is disciplined planning rather than another entry signal.

Both editions are available free with source code through the official MQL5 Code Base listings linked in the installation guide above. The listings identify fxliner as the author and show a publication date of 15 November 2026.

Source code and version history on MQL5 Algo Forge

For traders who want to review the implementation or follow future updates, the developer also maintains a public True Trading Cost repository on MQL5 Algo Forge. It brings the MT4 and MT5 source files together with screenshots, English and Indonesian setup notes, and a versioned source release. You can use the free Code Base downloads for installation, while Algo Forge is useful for inspecting changes and reporting technical issues.

Risk disclosure: Leveraged forex and CFD trading involves substantial risk of loss. A calculator’s estimated net R:R does not establish a trade’s probability of success, guarantee an execution price or cap losses in volatile markets.