Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

True Trading Cost - Net Risk Reward Calculator for MT4 - indicator for MetaTrader 4

fxliner
fxliner
Forex Trader | MetaTrader Tools & Broker Research
Forex trader based in Indonesia, with a focus on price action, market structure and disciplined risk management. I take a structured approach to chart analysis, position sizing and reviewing trading decisions.
Views:
63
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

True Trading Cost - Net Risk Reward Calculator for MT4

This free, source-included chart indicator helps discretionary traders estimate the monetary outcome of a planned Forex or CFD trade before placing an order. It displays the spread, position size, round-trip costs, break-even price, and gross versus net risk/reward. The BUY, SELL and RESET buttons manage a hypothetical plan only; no trade is ever sent.

Planning directly on the chart

  1. Attach the indicator to an MT4 chart. Choose BUY or SELL to initialize the Entry, Stop and Target lines.
  2. Drag the blue Entry, red Stop and green Target lines. The dashboard recalculates the trade plan. RESET initializes the levels from the latest Bid/Ask and ATR(14) of the last closed bar.
  3. Enter the broker's verified round-trip commission per one lot in account currency. For example, 3.50 charged at entry and another 3.50 at exit means an input of 7.00, not 3.50.
  4. Review the net risk, net reward, net R:R, break-even exit, suggested lot size and cost/target percentage before making your own trading decision.

What the calculations include

BUY entry is modeled at Ask and exits at Bid; SELL entry at Bid and exits at Ask. Therefore the entry spread is already represented in the executable-price difference and is not charged again in the net profit/loss. The displayed spread-equivalent amount is informational.

Gross risk and reward are calculated from the entry-to-stop and entry-to-target price distances, contract tick size, and the broker-reported tick value (MT4 supplies one value for both directions). Net loss adds modeled commission, additional fees and slippage, plus negative swap when expressly enabled. Net reward subtracts those fees and includes estimated swap only if the broker calendar has been verified.

Risk-based lot suggestions use a percentage of account equity, always rounded down to permitted volume increments. An insufficient budget produces no lot suggestion rather than silently increasing the risk to a minimum lot. A fixed-lot mode is also available.

Overnight swap and spread insights

The second panel offers an optional swap forecast and four six-hour blocks of observed spread, grouped by broker-server time. Samples are collected only from distinct incoming tick timestamps after the indicator starts; stale quotes are excluded. Statistics exist only in memory and reset daily or when the indicator is removed.

Swap supports OFF, AUTO or MANUAL. Automatic MT4 estimation supports swap expressed in points where the broker tick-size unit is interpretable; other modes require manual inputs. Unsupported modes are clearly indicated and must be entered manually. Actual rollover charges depend on the broker, triple-swap day, cutoff time, holidays and future changes; they cannot be guaranteed by this indicator.

Inputs and configuration

  • Sizing: InpSizing, InpRiskPercent, InpFixedLots.
  • Commission and costs: InpCommissionRoundTurnPerLot, InpCommissionVerified, InpExtraFeesRoundTurnPerLot, InpSlippageRoundTurnPoints, InpWarnCostTargetPercent.
  • Initial chart plan: InpInitialStopATRMultiplier, InpInitialTargetRR, InpFallbackStopPoints.
  • Panel: InpPanelX, InpPanelY, InpShowBreakEvenLine, InpUpdateSeconds, InpShowInsightsPanel.
  • Swap: InpSwapSource, InpRolloverDays, InpManualSwapPerLotNight, InpTripleSwapWeekday, InpSwapStartWeekdayOverride, InpSwapCalendarVerified, InpIncludeSwapInNetRR.
  • Spread statistics: InpCollectSpreadStats.
  • Offline simulation: InpUseManualSymbolSpecs, InpManualTickSizePrice, InpManualTickValueProfit, InpManualTickValueLoss, InpManualMinLot, InpManualMaxLot, InpManualLotStep, InpManualAccountCurrency, and InpMT4TickSizeUnit (AUTO, POINTS or PRICE to interpret broker tick-size units).

Important limitations

Commission, future slippage, overnight swap, tick-value conversion and execution prices may differ from an actual trade. The indicator does not verify free margin, broker stop-level constraints or order acceptance. If the broker does not supply valid tick values or equity, a clearly labeled manual contract-specification simulation is available for testing only, not as evidence of real broker costs.

No automated orders, EA, DLL or network requests. This is an educational calculation tool, not a trading signal, profit guarantee or substitute for validating a broker's contract specifications and transaction history.


Smart Liquidity Hunter — Confirmed Swing Sweeps for MT4 Smart Liquidity Hunter — Confirmed Swing Sweeps for MT4

Closed-bar sweeps of confirmed swing levels, with wick, volatility and freshness filters, liquidity lines, a dashboard and optional alerts.

Prop Risk Guard MT4 - daily loss and drawdown protection Prop Risk Guard MT4 - daily loss and drawdown protection

Protects a prop-firm or personal MT4 account: daily loss limit, max drawdown (static or trailing) and profit-target lock. On a breach it closes all orders, deletes pending orders and keeps the account flat until the lock resets.

Three Colors Three Colors

Example: Moving Average indicator filling by different colors

MACD Sample MACD Sample

Classical MACD Sample.