Estimate the account-currency loss between one hypothetical entry and stop, reserve cash for uncertain costs and floor the result to the broker's valid volume grid. No order is ever sent.
Version 1.00, MIT licensed and compiled with 0 errors / 0 warnings. A calculation cannot guarantee fill price, fees, slippage, margin availability, broker acceptance or trading results.
What it checks
Buy or sell entry-to-stop loss through OrderCalcProfit()
Maximum cash loss minus an explicit fees/slippage reserve
Minimum, maximum and offset-aware volume grid
Final loss recalculation at the broker-valid volume
Five deterministic volume-normalization cases
Run it in four steps
1
Download the MQ5 source and copy it to MQL5/Scripts/StratCoreAlpha/.
2
3
Set side, hypothetical entry and stop, cash cap and a conservative cost reserve.
4
Review the chart comment and Experts log; the script always reports that no order was sent.
The cash input is denominated in the account deposit currency printed by the probe. It is not automatically a USD cap on a non-USD account. A production EA must additionally freeze conversion, portfolio exposure, cost and margin rules.
Need the complete rule contract?
Freeze cash risk, state transitions and acceptance cases before the EA build.