I am trying to create an EA, and encounter a problem where all if conditions are not satisfied and it still process the code to open the order.
my code and strategy tester report is attached where i have highlighted the problem area.
please help me to locate the real cause of problem.
your newOrder Function will always get triggered once the buy conditions are satisfied, only the Alert will be controlled by the previous "if" Unless you group the Alert and newOrder together just as suggested by others
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I am trying to create an EA, and encounter a problem where all if conditions are not satisfied and it still process the code to open the order.
my code and strategy tester report is attached where i have highlighted the problem area.
please help me to locate the real cause of problem.
your newOrder Function will always get triggered once the buy conditions are satisfied, only the Alert will be controlled by the previous "if" Unless you group the Alert and newOrder together just as suggested by others