Equity Target Closer: Close All Trades at Profit or Loss Level
Info
The Equity Target Closer: Close All Trades at Profit or Loss Level is a Expert Advisor for MetaTrader 5 that equity target closer is a utility that simplifies trade management by closing all trades when your account reaches a specified profit target or loss limit. It's designed to work alongside your manual trading or other EAs, focusing solely on exit strategies.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Equity Target Closer: Close All Trades at Profit or Loss Level
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
Equity Target Closer is a utility that simplifies trade management by closing all trades when your account reaches a specified profit target or loss limit.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: Prop Firm Equity Guard: Daily and Maximum Drawdown Protection - another powerful expert for MetaTrader 5 traders.
Equity Target Closer is a utility that simplifies trade management by closing all trades when your account reaches a specified profit target or loss limit. It's designed to work alongside your manual trading or other EAs, focusing solely on exit strategies.Also recommended: Prop Firm Guardian: Manage Daily Loss, Max Loss, and Profit Target - similar expert with strong performance on MetaTrader 5.
Functionality
The Equity Target Closer measures the profit/loss (P/L) of the positions it monitors on every tick and once per second. When the P/L reaches the predefined profit target or loss limit, it takes action:
- Closes all positions at market rates.
- Optionally deletes pending orders.
- Can pause until the next day, ensuring any new trades are also closed, thus locking the day's trades.
Configuration
- Measurement: Choose between floating P/L of open positions or today's P/L (closed trades of the day + open positions). Deposits and withdrawals are excluded.
- Units: Specify in account currency or as a percentage of the balance.
- Profit and Loss Targets: Set the profit and loss levels at which to close all trades. A value of 0 disables the respective target.
- Symbol and Magic Number Filters: Optionally restrict the tool to a specific symbol or magic number, allowing for targeted trade management.
- Pending Order Deletion: Choose whether to delete pending orders upon reaching the targets.
- Daily Pause: Enable pausing until the next day to maintain consistent daily trading.
- Day Reset Hour: Define the server hour when the trading day starts, relevant for today's P/L and the daily pause.
Compatibility and Testing
The Equity Target Closer is versatile, working on any symbol and timeframe, and compatible with both netting and hedging accounts. Closing trades at market rates means results may slightly exceed the target in fast-moving markets or gaps. Extensive testing in the Strategy Tester with random trades consistently achieved closures at the target or limit.
Use Cases
- Lock in daily profits.
- Limit daily losses during manual trading sessions.
- Close a group of trades from one EA at a specific monetary target.
You may also like: G7 Pro Trade Manager and Prop Firm Equity Protector: 1-Click HUD for Advanced Trading - excellent alternative for expert users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property version "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#include <Trade/Trade.mqh>
enum ENUM_MEASURE
{
MEASURE_FLOATING = 0,
MEASURE_TODAY = 1
};
enum ENUM_UNITS
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.