Experts: Dual Profit Closer EA - MT4

 

Dual Profit Closer EA - MT4:

The Dual Profit Closer EA is a powerful automated tool designed to independently close all buy or sell orders once they reach your predefined profit thresholds.

Author: Kommoju Sahityananda Devi

 
hey
 
s EA only for MetaTrader4?
 
Gregory Kpalo #:
s EA only for MetaTrader4?

Yes, At present i have only created MT4 Version

 
In the overallbuy/sell profit what does the 0.2 relate to ie is it a percentage or what?

EDIT- I think i may have answered my own question I think 0.20 relates to .20 of currency, 200 would be 200 units of currency
 
gritech #:
In the overallbuy/sell profit what does the 0.2 relate to ie is it a percentage or what?

EDIT- I think i may have answered my own question I think 0.20 relates to .20 of currency, 200 would be 200 units of currency

Overall buy/sell profit is, as the name suggests, the total profit. For example, if the combined profit from all buy orders reaches 0.2, all buy orders will be closed. The same applies to sell orders. If you have a standard account, 0.20 would equal 20 cents or the equivalent amount in any other currency you use.
 
Suggestions: Efficiency Improvements: The createOrUpdateLabels() function is called in OnTick(), which means it runs on every tick. This could potentially impact performance, especially with many ticks per second. Consider only updating labels when a change is detected (e.g., profits update). Error Handling: The OrderClose() function has an if check, but for robustness, additional logging or a retry mechanism could be added for failures, especially in volatile market conditions. Code Optimization: The separate profit summation in CloseAllBuyOrdersIfProfitAbove() and CloseAllSellOrdersIfProfitAbove() duplicates calculations from OnTick(). It might be better to pass totalBuyProfit and totalSellProfit directly as parameters to these functions to avoid recalculating. Label Clarity: The Y-offsets for labels are hardcoded (spaceFromBottom - 6 and spaceFromBottom - 36). Consider making these dynamic or adjustable through user input for better UI flexibility. Function Naming: The function names CloseAllBuyOrdersIfProfitAbove() and CloseAllSellOrdersIfProfitAbove() clearly describe their purpose but could be made more concise (e.g., CloseBuyOrdersOnProfit()). Regards D.
 
is it possible when trade reaches at the profit of 50 pips then trailing stop loss active for 30 pips at that point and if price move further pips tsl move accordingly my whatsapp no. 923224629906