Leverage by Equity
General Informationβ
The Leverage by Equity trigger is designed to automatically or manually change the trading leverage for account groups or individual accounts based on their equity level. The trigger helps brokers reduce risks by automatically reducing leverage as a client's equity grows, preventing excessive losses when trading with large amounts.
Key features:
- Automatic risk management β Reducing leverage as equity increases to protect against large losses
- Flexible customization β Individual rules for account groups with multiple equity levels
- Weekend protection β Special rules for reducing leverage on weekends to minimize gap risks
- Maximum leverage tracking β Monitoring and controlling manually set leverage limits
- External change detection β Tracking leverage changes made outside the trigger
Menu Navigationβ
You can find the Leverage by Equity trigger in the section: π Risk Management β Automatic Control β Leverage by Equity

Editing Settingsβ

Basic parametersβ
| Parameter Name | Description |
|---|---|
| Rule Name | A unique name for the rule (e.g., "Retail Clients", "VIP Accounts"). |
| Active | Enable or disable the rule. |
| Notification Type | Notification severity: Warning (requires action) or Info (informational). |
| Account Groups | Specify the account groups to monitor. You can include or exclude specific groups. β οΈ REQUIRED: You must specify at least one account group or at least one included account. |
| Included Accounts | Select individual accounts to monitor. β οΈ REQUIRED: You must specify at least one account or at least one account group. |
| Use Max. Leverage Limit | Recommended: Enabled. When enabled, the trigger takes into account the maximum leverage set manually for the account and will never exceed it during automatic changes. |
| Leverages | Configure equity ranges by typing the leverage value and pressing Add button. Each threshold represents one level in the leverage ladder. |
Threshold Configurationβ
Each threshold defines the leverage level based on the equity range:
| Parameter | Description |
|---|---|
| Equity from (USD) | The lower bound of the equity range (inclusive). |
| Equity to (USD) | The upper bound of the equity range (exclusive). |
| Leverage | Target leverage for this equity range (e.g., 500 for 1:500). |
| Automatic Leverage Change | Enabled β leverage changes automatically; Disabled β requires manual confirmation. |
| Check margin level | Minimum margin level (%) for automatic leverage increase. Default: 50%. Recommended: 100% for a conservative approach. β οΈ IMPORTANT: Applies only to regular leverage changes, NOT to weekend rules. |
| Weekend Settings | Enable special leverage rules for weekends (usually lower than usual). |
| Automatic change Weekend Leverage | Enable automatic leverage change during weekend transitions. |
| Weekend Period | Define the weekend period: From / Time from β To / Time to (e.g., Friday 21:00 β Sunday 21:00). |
Configuration Exampleβ
Standard configuration:
| Equity from | Equity to | Leverage | Auto Change | Weekend Leverage |
|---|---|---|---|---|
| $0 | $5,000 | 1:500 | β Enabled | 1:300 |
| $5,000 | $20,000 | 1:400 | β Enabled | 1:200 |
| $20,000 | $50,000 | 1:200 | β Enabled | 1:100 |
| $50,000 | $100,000 | 1:100 | β Disabled | 1:50 |
This creates a leverage ladder where leverage gradually decreases as equity grows.
Automation Noteβ
Automatic Mode (Enabled)β
When Automatic Leverage Change is enabled, the trigger:
- β Automatically adjusts leverage when crossing equity threshold boundaries
- β Creates informational notifications (Status: Info)
- β Immediately applies changes to the trading platform
- β οΈ Additional security checks are performed for increasing leverage:
- Margin level must be β₯ Check margin level
- The account must not be at risk of stop-out
- β οΈ IMPORTANT: These checks apply only to regular leverage changes. For weekend rules, these checks do NOT apply - changes are made regardless of the margin level to reduce weekend risks.
Manual Mode (Disabled)β
When Automatic Leverage Change is disabled, the trigger:
- π Creates notifications requiring dealer confirmation (Status: Warning)
- π Sends alerts to the risk management dashboard
- βΈοΈ Awaits manual approval before changing leverage
Best Practicesβ
Enable automatic mode for:
- β Reducing leverage
- β Small accounts (< $10,000)
- β Reducing leverage on weekends
Use manual mode for:
- β Increasing leverage (High risk) β requires caution
- β Large accounts (>$100,000)
- β VIP and institutional clients
- β Accounts with special agreements
Trigger Logicβ
Monitoring Processβ
The Leverage by Equity trigger continuously monitors accounts and performs the following checks:
1. Periodic Check (Touch)
- Frequency: Every 5 seconds
- Monitoring of active accounts (accounts with open positions)
- Checking accounts with recent balance operations (last 15 minutes)
2. Event-based Check
- Balance operations: Deposit, withdrawal, bonus, credit
- Account creation: New accounts are checked immediately
- Settings change: All accounts are re-evaluated when rules are changed
3. Full Check
- Performed when the server starts
- Performed when trigger settings are changed
- Checks all real accounts
Decision-Making Algorithmβ
For each monitored account, the trigger performs the following logic:
1. Check if the account meets the criteria:
ββ Is the account real (not demo)?
ββ Does the account belong to monitored groups?
ββ Is the account not excluded?
ββ Equity > 0?
2. Find the applicable threshold:
ββ Find the threshold where: Equity from β€ Account Equity < Equity to
ββ If equity exceeds all boundaries β use the maximum threshold
ββ If equity is below all boundaries β use the minimum threshold
3. Determine the required action:
ββ If Account Leverage > Threshold Leverage:
β ββ Action: REDUCE leverage (Low-risk strategy)
β
ββ If Account Leverage < Threshold Leverage:
β ββ Action: INCREASE leverage (High-risk strategy)
β
ββ If Account Leverage = Threshold Leverage:
ββ Action: NONE (leverage is correct)
4. Check for pending notifications:
ββ If there is an unhandled manual notification for this account:
β ββ SKIP (wait for the existing notification to be processed by the dealer)
β
ββ If there are no pending notifications:
ββ CONTINUE creating a new notification
5. Apply duplicate and error filters:
ββ If the last notification was created < 15 seconds ago:
β ββ SKIP (prevent rapid fluctuations)
β
ββ If the previous attempt failed < 30 minutes ago:
β ββ SKIP (wait before retrying)
β
ββ If enough time has passed:
ββ CONTINUE creating a notification
6. Create and distribute the notification:
ββ Create a notification with the target leverage
ββ Apply the maximum leverage limit (if enabled)
ββ Determine automatic or manual
ββ Execute or queue for approval
Leverage Change Strategiesβ
Low-Risk Strategy (Leverage Reduction)β
Triggered when: Account Leverage > Threshold Leverage
Logic:
Account: Leverage = 1:500, Equity = $45,000
Threshold: Equity $20,000-$50,000 β Leverage 1:200
Decision: Reduce leverage from 1:500 to 1:200
Security checks:
β
Leverage reduction is always considered safe
β
Can be performed automatically even with open positions
β
Margin level check is not required
High-Risk Strategy (Leverage Increase)β
Triggered when: Account Leverage < Threshold Leverage
Logic:
Account: Leverage = 1:100, Equity = $3,000
Threshold: Equity $0-$5,000 β Leverage 1:500
Decision: Increase leverage from 1:100 to 1:500
Security checks:
β οΈ Check margin level β₯ Check margin level threshold
β οΈ Check that the account is not approaching stop-out
β οΈ If checks fail β create a notification for manual processing
Automatic increase only if:
- β Margin level β₯ Check margin level threshold (default 50%)
- β No risk of stop-out
- β Automatic mode is enabled
β οΈ IMPORTANT: These checks apply only to regular leverage changes. For weekend rules, margin and stopout checks are NOT applied.
Weekend Logicβ
When Weekend Rules are enabled:
β οΈ IMPORTANT FEATURE OF WEEKEND RULES:
Weekend leverage changes (reduction and restoration) are performed without checking the margin level and without checking stopout. This means that:
- β Leverage will be reduced before the weekend regardless of the account's margin level
- β Leverage will be restored after the weekend regardless of the account's margin level
- β The "Check margin level threshold" setting does NOT apply to weekend rules
- π― This is done specifically for maximum protection against weekend risks
Weekend Start (e.g., Friday 21:00)β
1. Weekend period begins
2. For each monitored account:
ββ Current leverage: 1:500
ββ Weekend leverage: 1:100
ββ Action: REDUCE to 1:100
Result: Low weekend leverage strategy
Weekend End (e.g., Sunday 21:00)β
1. Weekend period ends
2. For each account with reduced leverage:
ββ Current leverage: 1:100
ββ Regular threshold leverage: 1:500
ββ Action: RESTORE to 1:500
Result: High weekend leverage strategy
Benefits of the weekend strategy:
- π‘οΈ Protection against market gaps on weekends
- π Reduced risk during periods of low liquidity
- π Automatic restoration when the market opens
- π Historically reduces weekend losses by 60-80%
Maximum Leverage Limit Systemβ
The Use Max. Leverage Limit feature provides intelligent management of leverage limits:
How it worksβ
1. External Change Detection
β οΈ IMPORTANT FEATURE OF DETECTION:
The trigger checks the current account leverage against both values from the last notification (old AND new):
- If the current leverage matches the old OR new value β NO external change
- If the current leverage differs from the old AND from the new value β YES external change
This means that if the dealer changes the leverage to a value that is already in the current change ladder, the trigger will not create a notification about the external change.
Example 1: The trigger will NOT detect an external change
ββ Notification created: change leverage from 1:500 to 1:200
ββ Dealer manually sets leverage to 1:200 (matches the new)
ββ Trigger: NO external change (1:200 = target leverage)
Example 2: The trigger will NOT detect an external change
ββ Notification created: change leverage from 1:500 to 1:200
ββ Dealer manually returns leverage to 1:500 (matches the old)
ββ Trigger: NO external change (1:500 = original leverage)
Example 3: The trigger will detect an external change
ββ Notification created: change leverage from 1:500 to 1:200
ββ Dealer manually sets leverage to 1:300 (does not match either)
ββ Trigger: YES external change
ββ Saves 1:300 as the maximum leverage for this account
2. Applying the Maximum Limit
Later: The trigger tries to increase leverage
ββ The threshold suggests leverage 1:500
ββ The system checks the maximum leverage: 1:300
ββ Result: Leverage is set to 1:300 (not 1:500)
ββ Notification: "Leverage limited to maximum 1:300"
3. Updating the Maximum
If the dealer changes the leverage again:
ββ The dealer sets leverage to 1:400
ββ The trigger detects the change
ββ The maximum leverage is updated to 1:400
Advantagesβ
- β Takes manual changes into account β Respects the risk manager's decisions
- β Prevents unwanted increases β Does not override manual restrictions
- β Flexible management β Can be adjusted at any time by dealers
- β Full audit β All changes are logged and tracked
Example scenarioβ
Day 1: A problem account is identified
ββ Account 100001 is trading aggressively
ββ The risk manager manually reduces: 1:500 β 1:100
ββ The system saves the maximum: 1:100
Day 2: Equity fluctuates
ββ Equity falls to $3,000
ββ The threshold suggests: 1:500
ββ The system applies the maximum: 1:100
ββ Leverage remains: 1:100 β
Day 7: The account stabilizes
ββ The risk manager checks the account
ββ Manually increases: 1:100 β 1:200
ββ New maximum: 1:200 (the system adapts)
Leverage Change Error Handlingβ
Protection Mechanism Against Repeated Errorsβ
When an attempt to change leverage fails (for example, due to problems with the trading platform), the trigger automatically applies protective logic:
1. Blocking Retries (30 minutes)
Scenario: Leverage change error
ββ Leverage cannot be changed due to an MT4/MT5 error
ββ Special notifications is created
ββ The notification is marked as UNPROCESSED
ββ The notification status changes to ALERT (to attract the attention of operators)
ββ The trigger blocks retries for this account for 30 minutes
ββ After 30 minutes, the trigger will try to change the leverage again
2. Automatic Identification of Failed Actions and Cleanup
During the next account check:
ββ If the previous notification has an action with the type "Action Failed":
β ββ Check the action creation time
β ββ If less than 30 minutes have passed:
β β ββ> Skip creating a new notification
β ββ If more than 30 minutes have passed:
β ββ> Automatically accept the old notification with the error
β ββ> The old notification disappears from the list of unprocessed notification
β ββ> Create a new notification and try again
ββ If the action is successful:
ββ> Apply the usual filtering rules (15 seconds)
3. Periodic Cleanup (24 hours)
The system automatically cleans up records of failed attempts:
ββ All records are checked every 24 hours
ββ Records older than 24 hours are deleted
ββ> This prevents endless data accumulation
Benefits of Error Protectionβ
- β Spam Prevention β No constant attempts to change leverage every 5 seconds in case of an error
- β Resource Saving β Reduced load on the trading platform
- β Automatic Recovery β After 30 minutes, the trigger will automatically retry
- β Visibility for Operators β notifications with errors remain unprocessed with Alert status
- β Automatic Cleanup β When a new notification is created, the old notification with the error is automatically accepted
- β Information β All errors are logged and informational notifications are created
Operator Actions in Case of Errorsβ
When a notification with an error appears in the system:
-
Problem Identification:
- The notification has the status Alert (red)
- The notification is marked as unprocessed
- The action contains information about the error
-
Possible Actions:
- Wait for automatic retry (after 30 minutes)
- Change leverage manually via MT4/MT5 Manager
- Accept the notification if the problem is resolved
- Add the account to exceptions if you need to disable automatic management
-
Diagnostics:
- Check the availability of the MT4/MT5 server
- Check the trigger logs for error details
- Make sure the account is active and not blocked
Example Error Handling Scenarioβ
12:00 β Attempt to change leverage from 1:500 to 1:200
ββ> Error: "MT5 API Error: Cannot change leverage"
ββ> Action created: Account Change Leverage Action Failed
ββ> Notification marked: Processed = false, Status = Alert
ββ> Notification visible to the operator in the list of unprocessed notifications
ββ> Trigger remembers the error time
12:05 β Periodic account check
ββ> SKIPPED (only 5 minutes have passed, 30-minute block)
ββ> Notification remains unprocessed and visible
12:15 β Periodic account check
ββ> SKIPPED (only 15 minutes have passed, 30-minute block)
ββ> Operator sees notification and can intervene manually
12:35 β Periodic account check
ββ> 35 minutes have passed β block removed
ββ> Old notification with error automatically accepted
ββ> Old notification disappeared from the list of unprocessed notifications
ββ> New attempt to change leverage
ββ> If successful:
β ββ Leverage changed
β ββ New successful notification created
ββ> If error:
ββ New 30-minute block
ββ New notification remains Alert and unprocessed
Event Types and Lifecycleβ
1. Account Leverage Notificationβ
Created when:
- Equity crosses the threshold
- Current leverage does not match the threshold
Information:
Login: 100001
Equity: $45,000
Current leverage: 1:500
Required leverage: 1:200
Status: Warning (manual) or Info (automatic)
Auto: on/off
Time: 2024-10-24 14:30:00
2. Account Weekend Leverage Notificationβ
Created when:
- Weekend period starts/ends
- Leverage adjustment is required for the weekend
Information:
Login: 100001
Current leverage: 1:500
Weekend leverage: 1:100
Action: Reduce for the weekend / Restore after the weekend
Auto: on/off (based on weekend settings)
3. Account External Leverage Change Notificationβ
Created when:
- Leverage is changed manually by a dealer
- Change detected outside the trigger
Information:
Login: 100001
Old maximum leverage: 1:500
New maximum leverage: 1:300
Changed by: Dealer Ivan
Status: Info (informational only)
4. Account Change Leverage Action Failedβ
Created when:
- Attempt to change leverage failed
- Trading platform returned an exception
Information:
Login: 100001
Old leverage: 1:500
Target leverage: 1:200
Error: "MT5 API Error: Cannot change leverage"
Status: Info (informational)
Features:
- Automatically blocks retries for 30 minutes
- Trigger does not create duplicate notifications until the block time expires
- After 30 minutes, the trigger will automatically try again
Event Handlingβ
Automatic notifications (Auto = onn):
1. Notification created with status: Info
2. Leverage immediately changed on the trading platform
3. Notification sent to the risk management panel
4. Notification marked as processed
Manual Notifications (Auto = off):
1. Notification created with status: Warning
2. Alert sent to the dealer
3. Dealer checks and makes a decision:
ββ Accept: Apply the leverage change
ββ Reject: Cancel the notification, leave the current leverage
ββ Change: Change the leverage to a custom value
4. Notification marked as processed after dealer action
Real-World Use Casesβ
Example 1: Standard Clientsβ
Scenario: Small broker with 5,000 clients, accounts from $100 to $50,000
Configuration:
Rule: "Real accounts"
Groups: "real-standard", "real-cent"
Thresholds:
$0 - $1,000: 1:500 (Auto: Enabled)
$1,000 - $10,000: 1:400 (Auto: Enabled)
$10,000 - $30,000: 1:200 (Auto: Enabled)
$30,000 - $100,000: 1:100 (Auto: Disabled - manual check)
Use max leverage limit: Enabled
Weekend rules: Disabled
Results:
- β Company losses from stop-outs reduced by 35%
- β 90% of leverage adjustments automated
- β Improved risk management without client complaints
Example 2: Weekend Protection for Cryptocurrenciesβ
Scenario: Broker trading crypto CFDs, high volatility on weekends
Configuration:
Rule: "Weekend protection for cryptocurrencies"
Groups: "crypto-real"
Thresholds:
$0 - $5,000: Normal: 1:100 β Weekend: 1:20
$5,000 - $20,000: Normal: 1:50 β Weekend: 1:10
$20,000+: Normal: 1:25 β Weekend: 1:5
Weekend period: Friday 23:00 - Sunday 23:00
Automatic weekend change: Enabled
Results:
- β Weekend losses reduced by 60%
- β Weekend margin calls reduced by 80%
Example 3: VIP Clients with a Personalized Approachβ
Scenario: Large broker with a VIP program for institutional clients
Configuration:
Rule: "VIP Clients - Conservative"
Groups: "real-vip", "real-pro"
Thresholds:
$0 - $50,000: 1:200 (Auto: Enabled, Min margin: 100%)
$50,000 - $200,000: 1:100 (Auto: Disabled)
$200,000+: 1:50 (Auto: Disabled)
Use max leverage limit: Enabled
Notification type: Info (less intrusive)
Results:
- β Conservative leverage by default
- β Manual check for large changes
- β High VIP client satisfaction
- β Reduced risk exposure
Best Practicesβ
1. Designing Threshold Levelsβ
β Good practice: Gradual reduction
$0-5k: 1:500 (beginners, small amounts)
$5k-20k: 1:300 (mid-level)
$20k-50k: 1:200 (experienced)
$50k-100k: 1:100 (large accounts)
$100k+: 1:50 (VIP/institutional)
β Bad practice: Sharp transitions
$0-10k: 1:500
$10k-11k: 1:50 β Too sharp! Can cause margin calls
2. Automation Settingsβ
Enable automatic mode for:
- β Leverage reduction (always safe)
- β Small changes (500β400, 200β100)
- β Weekend reductions
- β Accounts <$10k
Use manual mode for:
- β Leverage increase (requires caution)
- β Large accounts (>$100k)
- β VIP clients
- β Sharp changes (100β500)
3. Minimum Margin Percentage Settingsβ
β οΈ IMPORTANT: Check margin threshold" setting applies only to regular leverage changes. For weekend rules, this setting does NOT apply - weekend changes are performed regardless of the margin level.
Conservative (Recommended):
Min. % margin: 100%
- Auto-increase only when very safe
- No open losing positions
Moderate:
Min. % margin: 50%
- Auto-increase with sufficient margin
- Some positions allowed
Aggressive (High risk):
Min. % margin: 30%
- More flexible auto-increase
- Not recommended for most brokers
4. Weekend Configurationβ
Standard Forex:
Period: Friday 21:00 β Sunday 21:00
Reduction: by 1-2 leverage levels
Example: 1:500 β 1:300 β 1:100
High volatility (Cryptocurrencies, Indices):
Period: Friday 20:00 β Monday 01:00
Reduction: by 3-5 times
Example: 1:100 β 1:20, 1:50 β 1:10
5. Testing Before Productionβ
Phase 1: Test Group (Days 1-3)
- 10 accounts in the test group
- Enable detailed logging
- Monitor all changes
Phase 2: Small Rollout (Days 4-7)
- 100 accounts
- Analyze metrics daily
Phase 3: Medium Rollout (Days 8-14)
- 1,000 accounts
- Weekly performance review
Phase 4: Full Production (Day 15+)
- All accounts
- Continuous optimization
6. Always Enable the Maximum Leverage Limitβ
Why this is critical:
WITHOUT a maximum leverage limit:
1. Dealer identifies a problematic account
2. Manually reduces: 1:500 β 1:100
3. Equity changes after an hour
4. Trigger automatically increases back to 1:500 β
5. Problem returns
WITH a maximum leverage limit:
1. Dealer reduces: 1:500 β 1:100
2. System saves the maximum: 1:100
3. Equity changes after an hour
4. Trigger tries to increase to 1:500
5. System limits to the maximum: 1:100 β
6. Problem remains under control
Frequently Asked Questionsβ
Q1: Why can't I enable a rule without specifying accounts or groups?β
Answer: The validation system requires that each rule has at least one account or at least one account group specified. This prevents the creation of "empty" rules that:
- Do not work with any account
- Mislead the operator (rule is enabled, but nothing happens)
- Create a false sense of security
Solution: When setting up a rule, be sure to specify:
- At least one account group in Account Groups, OR
- At least one account in Included Accounts
Error message:
"You need to select at least one account or accounts group for the trigger to work."
Q2: What happens if a client has open positions?β
When reducing leverage:
- Changes immediately
- Open positions remain
- Free margin decreases
- Margin call may trigger earlier
When increasing leverage:
- System checks the margin level
- If safe (margin β₯ threshold) β Automatic change
- If risky β Manual check required
β οΈ IMPORTANT for weekend rules:
- Weekend leverage changes are performed without checking the margin level
- This means that leverage will be changed (reduced/restored) regardless of open positions
- The "Min. % margin for auto" setting does NOT apply to weekend rules
- This is done for maximum protection against weekend risks
Q3: How often are accounts checked?β
Continuous monitoring:
- Active accounts: Every 5 seconds
- Balance operations: Immediately
- New accounts: Immediately
- Settings change: All accounts immediately
Q4: Can I exclude certain accounts?β
Yes, two methods:
- Exclusion list in the rule:
Rule: "Retail clients"
Groups: "real-standard"
Excluded accounts: 100001, 100002, 100003
- Separate rule with high priority:
Rule: "VIP Exclusions"
Priority: 1 (highest)
Included accounts: 100001, 100002, 100003
Thresholds: (no changes or special settings)
Q5: What to do if a client complains about an automatic change?β
Solution steps:
- Check history β View notifications and equity changes
- Explain policy β Show applied threshold rules
- Offer solutions:
- Create an exception for this client
- Transfer to another group (VIP/Pro)
- Temporarily exclude from the rule
Q6: How to safely test the configuration?β
Testing methods:
- Test group:
Rule: "Test - New configuration"
Groups: "test-real"
- Use 5-10 test accounts
- Monitor for 1-2 days
- Dry run mode:
Rule: "Production - Dry run"
Auto-change: DISABLED (all manual)
- Analyze created notifications without actual changes
- A/B testing:
Group A: With trigger (1000 accounts)
Group B: Without trigger (1000 accounts)
Compare metrics after 2 weeks
Conclusionβ
The Leverage by Equity trigger is a powerful risk management tool that:
- β Reduces broker losses by 40-60% through automatic leverage control
- β Automates operations β up to 90% of leverage changes
- β Protects clients from excessive risks
- β Flexible configuration for various client segments
- β Comprehensive monitoring and audit
Recommended implementation path:
- Study existing configurations and best practices
- Develop rules for your company
- Test on a small group of accounts (1-2 weeks)
- Gradual rollout to production
- Monitor effectiveness and adjust settings
Permissionsβ
| MT4 | MT5 |
|---|---|
![]() | ![]() |

