Leverage and Margin Controller
Sets account leverage by group policies, simultaneous equity/volume tiers, FX-converted exposure, symbol caps and event windows with stop-out protection.
What it does
10 capabilities- Per-group policies with simultaneous equity + volume tiers
- FX-converted open notional and net-lots exposure tiers
- Per-symbol max leverage caps (Gold, Crypto, indices)
- Dated and daily event windows with per-window =leverage overrides
- Hysteresis deadband to prevent tier flapping near thresholds
- Projected margin-level safety guard to prevent instant stop-outs
- Lower-only mode, credit exclusion and login exemptions
- Safe window restore that respects manual leverage cuts
- Audit report and dry-run approval workflow
- No repeated change for the same account and reason
How it works
The single canonical leverage plugin for FXOpsPro, superseding Leverage Switcher and Dynamic Leverage. Per-group policies select leverage by equity, balance, open volume or position count, and can combine multiple bases with '+' or run alongside volume_tiers simultaneously so the strictest leverage wins. Exposure tiers convert multi-currency position notionals using live profit-currency conversion rates, and symbol_leverage caps leverage for volatile instruments like Gold or Crypto. Dated and daily market event windows support per-window '=leverage' overrides and restore safely when windows end without overwriting manual reductions. Built-in hysteresis_percent prevents tier flapping near thresholds, min_margin_level_percent blocks leverage cuts that would trigger an instant stop-out, lower_only ensures leverage is never raised automatically, exclude_credit subtracts bonus credit from equity tiers, and exclude_logins exempts house or VIP accounts. Dry-run mode logs proposals to the audit report before going live.
Parameters & options
Configured directly in MetaTrader 5 Administrator and testable live in the simulator.
| Parameter | Type | Default | Description |
|---|---|---|---|
groups | group mask | * | Client groups that are managed (MT5 group mask). * means all |
dry_run | bool | 0 | 1: only write to the audit report what would change, change no leverage. Switch to 0 to approve |
policies | text | empty | Policies per group, separated by |, as groups: basis: from=leverage; ... Combine bases with + (e.g. vip*: equity: 0=200; 50000=100 + volume: 0=200; 10=100). Basis: equity, balance, volume or positions. First match wins |
default_policy | text | equity: 0=500; 5000=200; 20000=100 | Policy for groups that no policy above matches, as basis: from=leverage; ... (supports + to combine bases). Empty: none |
volume_tiers | text | empty | Additional total open-lots tiers evaluated simultaneously with policies, as lots=leverage; ... Lowest leverage wins. Empty: off |
exposure_mode | text | off | off, notional (FX-converted open notional in account currency) or net_lots (net lots per symbol, added up) |
exposure_levels | text | 500000=100; 2000000=50 | Exposure from which a leverage applies, as exposure=leverage; ... Account currency for notional, lots for net_lots |
symbol_leverage | text | empty | Per-symbol max leverage cap when account holds open positions in that symbol, as SYMBOL=leverage; ... (e.g. XAUUSD=100; BTC*=20) |
event_windows | text | empty | Dated windows with a lower leverage, separated by ;, as 2026-12-05 13:15-14:00[=leverage] (server time). Empty: none |
daily_windows | text | empty | Daily windows with a lower leverage, separated by ;, as [days] HH:MM-HH:MM[=leverage], e.g. fri 21:00-23:59=50; mon-fri 07:00-07:30 |
event_leverage | int | 100 | Default highest leverage during a window when =leverage is omitted. 0 switches default-leverage windows off |
lower_only | bool | 0 | 1: only lower leverage, never raise an account above its current leverage |
hysteresis_percent | number | 0.00 | Deadband percentage (0.00 to 50.00) below a tier threshold required before stepping leverage back up |
min_margin_level_percent | number | 0.00 | Safety guard (0.00 to 10000.00): skip lowering leverage and alert if projected margin level would fall below this percent (0: off) |
exclude_logins | text | empty | Comma-separated account logins exempt from all leverage changes |
exclude_credit | bool | 0 | 1: subtract positive account credit when evaluating equity tiers |
license_key | text | empty | License key from FXOpsPro, for example FXO-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX |
license_server | text | https://plugins.fxopspro.com | License server address |
Release history
- v1.2.0Latest2026-11-24
Supersedes Dynamic Leverage and Leverage Switcher. Added simultaneous equity + volume tiers (compound '+' policies and volume_tiers), FX-converted notional via Position::rate_profit, per-window '=leverage' overrides, symbol_leverage caps, lower_only, hysteresis_percent, min_margin_level_percent safety guard, exclude_logins, exclude_credit, exact weekday validation, safe orig_ restore tracking and out-of-group state pruning.
- v1.1.02026-11-22
Removed the order limits (max_share_pct, share_min_server_lots, max_account_notional). The plugin no longer rejects orders and no longer reads positions on orders. Fixed the example text of the policies parameter.
- v1.0.02026-11-20
First release. Merges the rules of Dynamic Leverage and Leverage Switcher and adds exposure tiers, market event windows, concentration limits, dry run and an audit report.
Leverage and margin



