hey
s EA only for MetaTrader4?
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
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
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.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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