Equity Guard EA

USER GUIDE – Equity Guard EA

Let us give you an example of how Equity Guard works:

Attach EA to any blank Chart when you don’t have any existing trade. For example, your equity is 1000 and you set EA’s input ‘Profit Type=In Currency’ and ‘Profit Value=5.0’. You start trading by manual or any other EA. When your current equity gain is 5 (mean total equity 1005), EA will close all trade and record new equity now 1005. Again your equity gain 5 from last recorded equity, EA trigger and close all trade. EA use global variable to record previous equity, so if your MT4 close or your VPS restart, EA will restore recorded equity from global variable. You can change/modify recorded equity from dashboard record equity input box.

EA CONFIGURATION

  • Stop EA: If set to true, the EA will cease all operations and remain inactive until manually reactivated by setting it to false. This feature is useful when a trader wants to temporarily pause the EA without removing it from the chart.

 

TRIGGER #1

The Trigger #1 section monitors account equity profit and loss, making decisions based on the difference between Recorded Equity and Current Equity. Without both these values, the EA cannot determine whether your account is in profit or loss.

How Recorded Equity Works

The EA records an initial equity value when attached to a chart. This recorded equity acts as a reference point to calculate profit and loss.

When is the Recorded Equity Set?

There are four possible ways the EA sets the recorded equity:

    1. No Order (Default Recording)

      • If there are no active trades when the EA is attached, the current equity is recorded.
      • The EA will not update the recorded equity until a trigger event occurs.
      • Example: If your starting equity is $1000, the EA records this. When you place a trade, the EA monitors the profit or loss based on this recorded value.
    2. After Trigger Hit (No Order Mode)

      • The EA will not record equity immediately upon attachment, regardless of open trades.
      • It only begins recording after the first trigger event.
      • Use Case: This is useful when you want to manually input the first recorded equity rather than relying on the EA’s automatic recording.
    3. After Trigger Hit (Last Equity Mode)

      • The EA updates recorded equity only after a trigger event.
      • When Trigger #1 is hit and all actions are executed, the new recorded equity becomes the equity at that moment.
      • Example: If recorded equity is $1000, and the profit target of $10 is hit (new equity $1010), the EA resets the recorded equity to $1010.
    4. After Trigger Hit (Highest Equity Mode)

      • The EA records the highest equity value after each trigger event.
      • Even if equity decreases, the recorded value does not update until a profit trigger is met.
      • Example:
        • Recorded Equity: $1000
        • Profit Target: $100
        • A trade is opened, and the account goes into $10 loss (equity $990) → EA does not update recorded equity.
        • The equity later rises to $1100 (profit trigger hit) → EA updates recorded equity to $1100.

Why is Recorded Equity Important?

    1. Prevents false triggers – Without a reference equity point, the EA would not know if the account is in profit or loss.
    2. Ensures accurate calculations – The EA needs a stable starting equity value to compare changes over time.
    3. Supports recovery & consistency – If the EA is removed and reattached, it reloads the last recorded equity to avoid miscalculations.

Equity Profit & Loss Calculation

    • Current Equity – Recorded Equity = Profit or Loss
    • If profit or loss reaches the set threshold, Trigger #1 activates, and actions execute.

Input Explanation

    • Equity Reset Type – Defines when the EA should record equity.
    • Equity Profit Type – Measures profit in currency ($) or percentage (%).
    • Profit Value – Profit threshold before a trigger is activated.
    • Equity Loss Type – Measures loss in currency ($) or percentage (%).
    • Loss Value – Loss threshold before a trigger is activated.
    • Max Equity DD (%) – Tracks the maximum percentage of equity drawdown from recorded equity.

Max Equity Drawdown Example

    • Recorded Equity: $1000
    • Max Equity DD: 5%
    • If current equity drops to $950, the drawdown trigger activates, and the EA performs the defined actions.

This system ensures precise profit and loss tracking, preventing unnecessary losses and managing risk effectively.

 

How to Check if EA Has Recorded Equity

To ensure that Trigger #1 functions properly, the EA must have a recorded equity value.

    • In the EA’s Dashboard, there is a Record Equity text box.
    • If you see a numerical value in this box, it means the EA has successfully recorded equity.
    • If the value is 0, it means the EA has not recorded any equity yet, and Trigger #1 will not work until equity is recorded.

Manually Overriding or Setting Recorded Equity

If you want to manually set the recorded equity:

    1. Go to the EA’s Dashboard.
    2. Locate the Record Equity text box.
    3. Enter your desired equity value and press Enter.
    4. The EA will now use this value as the recorded equity for all calculations.

This feature allows traders to manually reset the equity reference point when needed.

 

TRIGGER #2

Unlike Trigger #1, which relies on recorded equity, Trigger #2 works directly with current equity and balance values to activate specific actions. This section is especially useful for prop firm trading, where strict risk management is required.

Trigger Conditions:

  1. Equity Above This Level – If the current equity rises above the set threshold, the EA triggers actions.
  2. Equity Below This Level – If the current equity falls below the set threshold, the EA triggers actions.

Drawdown Protection:

  1. Max Equity Daily DD (%) – This sets the maximum daily equity drawdown as a percentage.

    • Formula:
      Current Equity – Equity Reset Value = Drawdown %
    • If the equity drawdown reaches the set limit, the EA will take action.
  2. Equity Reset Time – At this specified time, the EA resets the recorded equity value for a fresh calculation.

    • Example: If reset time is 00:00-00:20, the EA will update the equity reset value at that time every day.

Balance-Based Drawdown Protection:

  1. Max Balance Daily DD (%) – Works similarly to Max Equity Daily DD (%), but it calculates drawdown based on balance instead of equity.
  2. Balance Reset Time – Defines the time when the EA will reset the balance reference point for drawdown calculations.

Why is This Important?

  • These settings help maintain strict risk management, especially for prop firm accounts where daily drawdown limits must be respected.
  • By resetting at specific times, traders can control their exposure and avoid breaching prop firm rules.

 

TRIGGER #3

Trigger #3 focuses on closing trades based on time and profit conditions rather than equity or balance values. This section ensures trades are managed efficiently within a specified timeframe to avoid unnecessary risk exposure.

Trigger Conditions:

  1. Close Trade by Time Zone (CloseTradeByTime = true)

    • If enabled, the EA will close all active trades within a specified time range.
    • Example: If set to 20:00 – 22:00, all open trades will be closed within this period.
  2. Minimum Profit for Time-Based Closure (MinimumProfit_CloseTime)

    • Ensures that trades are only closed if the total profit reaches the specified threshold during the time zone.
    • Example: If set to $10, trades will only close within the time range if the total profit is at least $10.

Daily, Weekly, and Monthly Profit/Loss Limits:

These settings allow traders to cap their profits and losses within specific timeframes.

  1. Daily Max Profit ($) / Weekly Max Profit ($) / Monthly Max Profit ($)

    • If total profit reaches the set limit for the day, week, or month, the EA triggers an action (e.g., closing trades).
  2. Daily Max Loss ($) / Weekly Max Loss ($) / Monthly Max Loss ($)

    • If the total loss reaches the set limit, the EA executes predefined actions.

 

ACTION

When any condition from Trigger #1, #2, or #3 is met, the EA executes all predefined actions listed in this section.

  • Close All Active Orders:

    • If true, closes all currently open trades.
    • If false, active trades remain open.
  • Delete All Pending Orders:

    • If true, deletes all pending orders when a trigger is activated.
    • If false, pending orders remain.
  • Stop EA After Trigger:

    • Defines how long the Equity Guard EA will stop after a trigger is hit.
    • None → EA continues running without stopping.
    • Stop EA For X-Minutes → EA pauses for a specific time (set in X_Minute).
    • Stop EA For This Day → EA stops for the rest of the day and resumes the next day.
    • Stop EA Until Reset EA → EA remains stopped until manually restarted.
  • Stop Duration:

    • Defines the number of minutes EA will pause if Stop EA For X-Minute is selected.
    • Example: 10 → EA stops for 10 minutes and resumes automatically.
  • Disable External EA:

    • If true, disables other external EAs when the trigger is hit.
    • If false, external EAs continue running.
  • Enable Pop-Up Alerts:

    • If true, displays a pop-up alert in MetaTrader.
    • If false, no pop-up alert appears.
  • Enable Email Alerts:

    • If true, sends an email notification when a trigger is activated.
    • If false, no email alert is sent.
  • Enable Mobile Notifications:

    • If true, sends a push notification to the MetaTrader mobile app.
    • If false, no mobile alert is sent.
  • Enable Sound Alerts:

    • If true, plays a sound alert when a trigger is activated.
    • If false, no sound alert is played.

 

Keep In Mind (TWO IMPORTANT RULES)

1. Attach EA when you have no exiting orders.

2. EA work with equity gain or loss. If you deposit/withdraw money when your trade is open and Equity guard EA working, then EA will consider as equity gain/loss and trigger. Example: you set equity profit 5 and your record equity was 1000 so EA’s target equity is 1005. Now you have five open trade and floating loss is -50. At this time you deposit new fund 100 and your current equity is (Previous Equity (1000)+Floating Profit/Loss (-50)+New Fund (100)=1050). In this scenario your new equity is bigger than your target equity. So EA will close all trade. But originally you have loss of 50. To avoid this type of situation, my recommendation is don’t deposit or withdraw money when you have trade. If there is no trade you can deposit or withdraw money, there is no problem. In case you need deposit or withdraw money follow below:

  1. Stop EA by input setting.
  2. Deposit/Withdraw Fund.
  3. Modify your record equity input value.
  4. Run EA by click EA status button again.

 

How to EA's Disable/Enable your External EA

In this post I will describe how our EAs remove or restore your external EA automatically. The product can control External EA by changing the template. According to Market place rule, any product can’t use DLL file. Without DLL file it is not possible control External EA (Remove/Attach EA). So without DLL it is better to use change template to remove external EA. To do that you need three data put our EA's input.
  • External Chart ID:  Every chart you open has a unique identification number. You need that number to apply template on that chart.
  • Remove EA’s Template Name: A template with a blank chart.
  • Restore EA’s Template Name: A template with your EA.
When our EA needs to remove your external EA. It applies Remove EA’s Template Name to remove your External EA. After it need end it apply Restore EA’s Template Name to restore your External EA. So your EA can work properly. External Chart ID: Put your chart ID here. If you have multiple External EA on multiple chart, put multiple chart ID on input box separated by commas. The example you are running three EA and you want to disable all of three EA after equity trigger. Then put that three chart ID into External Chart ID input box and all value separated by a semicolon (;). Example (130923092937824602;130923092937824603;130923092937824888)

KEEP IN MIND

  • Don’t put any other value for separated without semicolon (;).
  • Don’t put any white space between the two gaps.
Remove EA’s Template Name:Put here template name that remove/disable your EA. How to create Remove EA’s TemplateThere are two ways you can create Remove EA’s Template -First - Save a template with a Blank chart. So when our EA apply this template on your External EA, your ea will be remove from chart. Second - Save a template with your external EA but just un-check "Allow live Trading". So when our EA apply this template on your chart your ea will not be remove but can't open any trade. Save template with any name as you want. Like (remove1, remove2) you can put any name. Then put that template name on the input of Remove EA’s Template Name. If you have multiple External EA and put multiple Chart ID then you have to also put multiple Remove EA’s Template Name separated by semicolon (;).

KEEP IN MIND -

  • Template name is case-sensitive.
  • Don’t put file extensions into Remove EA’s Template Name’s input.
 Restore EA’s Template Name:Put here the template name that restores your EA again. Save the template with your EA and keep checking “Allow live Trading”. Save template with any name as you want. Like (attach1, attach2). Then put same template name on Restore EA’s Template Name. If you have multiple External EA and put multiple Chart ID then you have to also put multiple Restore EA’s Template Name separated by commas. 

How EA work with multiple value

When you work with multiple external EA and you want our product remove all external EA then you have to put all of your chart ID into External Chart ID. Below example show you how muliple value of External Chart ID with work with Remove EA's Template Name 

Example 1

External Chart ID - 130923092937824602;130923092937824603;130923092937824888. Remove EA’s Template Name  - remove1; remove2; remove3. Restore EA’s Template Name  - attach1; attach2; attach3.

So when our EA remove external EA, it use template serial with Chart ID

First Chart ID (130923092937824602) will be use “remove1” template to remove your EA and use “attach1” template to restore your EA. Second Chart ID (130923092937824603) will be use “remove2” template to remove your EA and use “attach2” template to restore your EA. Third Chart ID (130923092937824888) will be use “remove3” template to remove your EA and use “attach2” template to restore your EA.

 

Example 2

External Chart ID - 130923092937824602;130923092937824603;130923092937824888. Remove EA’s Template Name - remove1. Restore EA’s Template Name - attach1.

Then all chart ID use "remove1" template for remove EA and use "attach1" template for restore external EA.

Example 3

External Chart ID - 130923092937824602;130923092937824603;130923092937824888. Remove EA’s Template Name - remove1. Restore EA’s Template Name - attach1;attach2;attach3.

Then all chart ID use "remove1" template for remove EA and use "attach1" to Chart ID one and "attach2" to Chart ID next one and "attach3" to Chart ID last one for restore external EA.

 If your use different EA or same EA with different setting then fellow Example 1 or Example 3If you are using same EA with same setting on multiple chart, then fellow Example 2 

How to get your Chart ID

Use the MeetAlgo Get Chart ID indicator to know your chart ID. Indicator show your chart ID on a text box. You can copy your chart ID from the text box and then paste on EA's input.

Download Chart ID

MeetAlgo Get Chart ID MT4

MeetAlgo Get Chart ID MT5