The function’s scope

OrderCalcMargin takes the order type, symbol, volume and price, and returns an estimate in the account currency. The documented calculation applies current conditions as if there were no open positions or pending orders. MQL5 OrderCalcMargin ↗

A brokerage-panel example

Suppose a standalone estimate is $500. Label its scope when the account already holds positions. To display a change in total account margin, use a separate check that considers accounting mode and symbol conditions.

What support should retain

Save the account currency, leverage, symbol, price, volume and result of the specific request check. Include the estimate time if quotes can move before submission. These records distinguish the preview from the later server result.