Mario Vasconcelos:
Hello everyone,
Going through the first steps of MQL4 programing and starting from something simple (code attached).
Compiling shows 0 errors and no warnings. When I run it on the backtester (during 1 full month) it only places a single BUY order which it closes immediately after opening.
I've tried many changes for the last week but not resolving.
Could anyone have a look and show me the solution?
Thanks in advance for your hints.
Cheers!
You have an issue with the ticket number... also check at what prices you buy/sell ...also when closing orders and use OrderSelect() use OrderClosePrice() instead of Ask/Bid
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
Hello everyone,
Going through the first steps of MQL4 programing and starting from something simple (code attached).
Compiling shows 0 errors and no warnings. When I run it on the backtester (during 1 full month) it only places a single BUY order which it closes immediately after opening.
I've tried many changes for the last week but not resolving.
Could anyone have a look and show me the solution?
Thanks in advance for your hints.
Cheers!