Inactive Accounts Cleaner
Once a day, find inactive accounts with no open exposure, pending orders, recent deals, or active IB links, warn clients if configured, and archive, disable, or move them.
What it does
8 capabilities- Daily run at a set server time with crash-safe persistence
- Skips negative balances by default to protect uncollected debt
- Checks open positions, pending orders, online sessions, recent deals, and IB agents
- Per-group login scan and max_per_run batch throttle for large servers
- Confirmed archive via OpResult plus disable and move_group actions
- Optional client warning mail N days before inactivity cutoff
- Dry run by default, exempt logins, group mask, and min_registered_days
- Report of every account found, warned, or acted on
How it works
Once a day at a configured server time, the plugin scans accounts in matching groups using per-group login lookups and batch throttling (max_per_run). Accounts are skipped when they hold open positions, pending orders, online sessions, credit, balance above max_balance, negative balance (unless allow_negative_balance=1), recent deals (check_deals_days), active IB referrals (skip_ib_agents=1), or age below min_registered_days. Optional warning mails can be sent warn_days_before the cutoff. Eligible accounts are archived (verified via OpResult), disabled, or moved to target_group. Starts in dry_run mode and persists the last run day and warning records over restarts.
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 checked (MT5 group mask). * means all |
inactive_days | int | 365 | An account is inactive when its last access is older than this many days |
max_balance | decimal | 0.00 | Accounts with a balance above this amount are kept |
allow_negative_balance | bool | 0 | 0: keep accounts with negative balance (uncollected debt). 1: include negative balances |
run_time | text | 03:00 | Time of the daily run, HH:MM server time |
dry_run | bool | 1 | 1: only report what would be done. 0: perform the configured action |
action | text | archive | Action on inactive accounts: archive, disable, or move_group |
target_group | text | empty | Destination group when action is move_group |
max_per_run | int | 500 | Maximum number of inactive accounts acted on per daily run |
check_deals_days | int | 0 | If > 0, skip accounts that had any deal in the last N days |
skip_ib_agents | bool | 1 | 1: skip accounts that are the IB agent for any other account |
warn_days_before | int | 0 | If > 0, send a client mail warning this many days before the inactivity cutoff |
min_registered_days | int | 0 | Skip accounts registered fewer than this many days ago |
exempt_logins | text | empty | Logins that are never archived or modified, separated by commas |
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.1.0Latest2026-11-24
Fixed archiving negative-balance accounts (added allow_negative_balance=0 default); added pending order, online session, recent deals (check_deals_days), IB agent (skip_ib_agents), and min_registered_days safeguards; replaced full scans with per-group logins_in_group, single all_positions() set, unordered_set exempt_logins, and max_per_run throttling; switched to confirmed account_archive() OpResult; added warn_days_before mail notices, action (archive|disable|move_group) + target_group, and mark_dirty() persistence.
Reports and administration



