Panel for General close
Intended for closing orders when their total profit or loss reaches a given value.
The panel consists of two tabs:
- All symbols - designed to close orders on all symbols.
- Only XXXXXX - designed to close orders only on the current symbol.
- Button to go to the General Closing panel.
- Tab for setting the function of closing orders for all symbols. The function on this tab takes into account the profit of all positions on the account. When the specified profit or loss is reached, the function will close all orders on the trading account.
- Tab for setting the function of closing orders for the current symbol. The function on this tab takes into account the profit of positions opened on the current symbol. When the specified profit or loss is reached, the function will close orders on the current symbol.
- Current profit in currency and as a percentage of the balance.
- The type of position whose profit should be taken into account.
- Type of orders to be closed.
- Close positions when the specified profit in currency is reached. *
- Close positions upon reaching the specified profit as a percentage of the balance. *
- Close positions when a specified loss in currency is reached. *
- Close positions upon reaching a specified loss as a percentage of the balance. *
How to set the function General closing of orders on all symbols
- Click on the All Symbols tab.
- Select the type of orders whose profit or loss will be taken into account by the panel.
- Select the type of orders that will be closed when the specified profit or loss is reached.
- Select conditions for closing orders. *
How to set the General closing of orders on the current symbol
- Click on the Only XXXXXX tab.
- Select the type of orders whose profit or loss will be taken into account by the panel.
- Select the type of orders that will be closed when the specified profit or loss is reached.
- Select conditions for closing orders. *
* Attention! The function takes into account the sign of the entered profit/loss number, this means that if you need to enter a negative number in the field, then you need to enter it with a minus sign.
If Order Magic Number > 0, then the function will take into account and close only those orders that have the same Magic Number as in the panel settings:
![](https://c.mql5.com/6/942/set-magic-number_e14.png)
Magic Number - Each Expert Advisor signs its orders with a numerical identifier (Magic Number). This is necessary so that each Expert Advisor works only with its own orders, and does not confuse its own orders with those of others. Set the panels and all Expert Advisors working on the same trading account to have different Magic Numbers. If only the Trading Panel (one instance) works on the trading account, then we recommend setting the Magic number = 0. With Magic = 0, the panel will manage all orders on the trading account, regardless of how and on which symbol they were opened.
![](https://c.mql5.com/6/942/set-magic-number_e14.png)
Magic Number - Each Expert Advisor signs its orders with a numerical identifier (Magic Number). This is necessary so that each Expert Advisor works only with its own orders, and does not confuse its own orders with those of others. Set the panels and all Expert Advisors working on the same trading account to have different Magic Numbers. If only the Trading Panel (one instance) works on the trading account, then we recommend setting the Magic number = 0. With Magic = 0, the panel will manage all orders on the trading account, regardless of how and on which symbol they were opened.
Attention!
The "General close" function is performed by the panel. This feature will only work if your terminal and panel are turned on. If you turn off the terminal or panel, this function will also be disabled (will not work).
The "General close" function is performed by the panel. This feature will only work if your terminal and panel are turned on. If you turn off the terminal or panel, this function will also be disabled (will not work).