EA StopLoss Manager
- Yardımcı programlar
- Dario Murenu
- Sürüm: 1.0
- Etkinleştirmeler: 5
The EA StopLoss Manager manages the StopLoss and TakeProfit of trades entered in the market with other Expert Advisors (EAs) operating on the MetaTrader 4 platform.
If MagicNumber = 0, the EA StopLoss Manager will modify all open orders with the chosen settings.
Once the trades to modify are identified, using the MagicNumber setting, you can choose the percentage of risk and profit to apply to the orders. For example, by setting the value of 1 for the RiskPercSL parameter (RiskPercSL = 1), the StopLoss will be set to 1%.
The same principle applies to TakeProfit with the RiskPercTP parameter. For example, by setting the value of 1 for the RiskPercTP parameter (RiskPercTP = 1), the TakeProfit will be set to 1%.
The calculation of the risk and profit percentage of the orders can be aggregated together using the BasketCalculation parameter set to true. For example, if you want to modify 6 orders together and want an overall risk of 2%, with BasketCalculation = true (function activated), the StopLoss and TakeProfit will be modified taking into account all the orders.
Depending on your strategy, it may be useful to continue calculating the risk and profit percentage based on a fixed balance. For example, with a balance of €10,000, you want a 1% risk until the balance reaches €12,000. The Balance parameter allows you to do this, and you have the option to lock the calculation of the percentage on the desired amount.
On the chart, information related to the last selected settings will be displayed. The set MagicNumber, the state of the BasketCalculation parameter, the risk and profit percentages with their corresponding monetary values (calculated based on the set balance) will be shown.
Below are the specifications of the parameters.
Parameters:
MagicNumber: The MagicNumber is used to identify positions already opened by another expert advisor (EA). To make the EA StopLoss Manager work correctly, you need to replace the default MagicNumber value with the value used by other EAs, so that you can manage the StopLoss and TakeProfit of the orders. If MagicNumber = 0, the EA StopLoss Manager will modify all open orders with the chosen settings.
RiskPercSL: The RiskPercSL parameter defines the percentage value of the risk. If the BasketCalculation parameter is set to false, the defined risk will be applied to each trade. The percentage calculation will also depend on the Balance variable. With Balance = 0, the account balance will be used.
RiskPercTP: The RiskPercTP parameter defines the percentage value of the potential profit. If the BasketCalculation parameter is set to false, the defined potential profit will be applied to each trade. The percentage calculation will also depend on the Balance variable. With Balance = 0, the account balance will be used.
BasketCalculation: The BasketCalculation parameter determines whether all open orders will be aggregated for the percentage calculation of the risk and profit. In other words, if, for example, there are 3 open positions and BasketCalculation = true, the risk and profit will be evenly distributed among the 3 positions. However, with the BasketCalculation parameter set to false, the risk and potential profit will be defined for each trade in the same way.
For example, with RiskPercSL = 1 and RiskPercTP = 1, all 3 trades will have a 1% risk and potential profit. Therefore, if all 3 trades were to be lost or won, there would be a loss or profit of 3%. The percentage calculation will also depend on the Balance variable, described below.
Balance: The Balance variable determines the amount on which the percentage calculation is based. If Balance = 0, the percentages will be calculated based on the entire available account balance.
For example, if Balance = 5,000 is set on an account with a current balance of 20,000, the risk and profit percentages set with the RiskPercSL and RiskPercTP parameters will be calculated based on 5,000. In other words, in this example, the risk will be 4 times lower than the available account balance.
Using this variable is useful when you want to risk a certain amount in percentage terms for a certain period of time. For example, if you don't like the current market situation, you can easily reduce the risk for a certain period of time instead of continuously adjusting the risk based on the available balance on the account.
ColorBack: Setting the background color of the information displayed on the chart of the EA StopLoss Manager.
ColorText: Setting the text color of the information displayed on the chart of the EA StopLoss Manager.
For any further information, contact me at dario@imparainvesti.it or visit https://imparainvesti.it/.