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
Scripts

MT5 Cash Risk Probe - Read-Only Sizing - script for MetaTrader 5

Arnold Holm
Arnold Holm
I develop MQL4/MQL5 Expert Advisors, indicators, dashboards and trade-management tools from explicit written rules. I also convert authorized TradingView/Pine Script logic to MetaTrader 5 and turn rough ideas into testable technical specifications.
Public proof
Views:
108
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

MT5 Cash Risk Probe read-only account-currency sizing

MT5 Cash Risk Probe is a read-only MetaTrader 5 script for checking one cash-risk sizing boundary before order logic is implemented. It does not send, modify or close any order.

How it works

The script calls OrderCalcProfit() for a hypothetical one-lot trade between the chosen entry and stop. This returns the price-loss estimate in the terminal account deposit currency. The script subtracts an explicit cash reserve for fees or slippage, divides the remaining budget by the one-lot loss, floors the result to the symbol volume grid and recalculates the final loss.

Every successful report includes the symbol, side, account currency, entry, stop, cash budget, reserve, one-lot loss, raw volume, final volume, estimated price loss, estimated total, broker minimum/maximum/step/limit, tick size and order_sent=false .

Inputs

  • InpSymbol — symbol to inspect; blank uses the current chart symbol.
  • InpSide — hypothetical BUY or SELL direction.
  • InpEntryPrice — explicit entry; zero uses current Ask for BUY or Bid for SELL.
  • InpStopPrice — required hypothetical stop price. A BUY stop must be below entry; a SELL stop must be above entry.
  • InpRiskCash — maximum cash budget in the reported account deposit currency.
  • InpCashCostReserve — explicit cash amount reserved for commission, fees or slippage assumptions. It must be nonnegative and below the cash budget.
  • InpRunSelfTests — runs five deterministic volume-floor boundary tests at startup.

Deterministic checks

The startup tests cover ordinary 0.01-step flooring, below-minimum rejection, maximum-volume capping, a 0.10 step and a grid whose minimum is not an integer multiple of its step. The broker-dependent calculation blocks missing or wrong-side stops, invalid cash values, unavailable ticks, invalid volume metadata, failed profit calculation and a budget below minimum volume.

Result interpretation

PASS means the recalculated price loss plus the explicit cash reserve does not exceed the entered cash budget. BLOCKED means a required input, terminal state, broker property or calculation boundary could not be validated safely. A block is intentional: the script does not guess missing values.

Installation

  1. Copy SCA_MT5CashRiskProbe.mq5 to MQL5\Scripts\StratCoreAlpha\ .
  2. Compile it in MetaEditor.
  3. Run it on an MT5 chart and review the chart comment and Experts log.

A connected terminal is required for broker/account-currency profit calculation.

Limitations

This is engineering diagnostic code, not trading advice or a performance claim. PASS does not guarantee fill price, commission, slippage, margin availability, trade-server acceptance or profit. The script does not aggregate portfolio exposure and does not send orders.

XAUUSD MTF Liquidity OB Reversal Breakout XAUUSD MTF Liquidity OB Reversal Breakout

XAUUSD MTF Liquidity & Order Block Reversal Strategy A professional Smart Money Concepts (SMC) based MT5 indicator designed primarily for **XAUUSD (Gold)**. The strategy combines multi-timeframe liquidity, order blocks, liquidity sweeps, breakout/reversal confirmation, and M1 swing-based risk management to identify high-probability BUY and SELL opportunities. Strategy Features Multi-Timeframe Liquidity Detection The indicator identifies important liquidity and order-block levels from: * Best Day-wise Liquidity * H4 Liquidity & Order Blocks * M30 Liquidity & Order Blocks * M15 Liquidity & Order Blocks * M5 Liquidity & Order Blocks The strongest day-wise liquidity replaces simple Previous Day High/Low logic and searches historical daily candles for significant liquidity concentrations.

Swing Trading Dashboard Swing Trading Dashboard

Swing Trading Dashboard is a visual indicator for MetaTrader 5 (it does not generate automatic trade signals — it only displays information on the chart). Essentially it's a "dashboard" panel that calculates the recent swing trading range and shows where the current price sits relative to it — mid-range, near a boundary, or already broken out.

Channel Breakout Dashboard Channel Breakout Dashboard

Channel Breakout Dashboard is an informational panel (not an automated trading robot) that runs on the MetaTrader 5 chart and centralizes, in one place, several market conditions that would otherwise require 4-5 separate indicators open at the same time.

News Trading Dashboard News Trading Dashboard

News Trading Dashboard is an informational on-chart panel (it does not trade automatically) that monitors market volatility in real time to detect "news spike" moments — the sudden price moves that occur when economic data is released (NFP, CPI, interest rate decisions, etc.).