Hi guys, I have created a function for opening buy/ sell trades, but the EA opens more than 1 trades when I set the trade number 0 someone kindly help, I have tried adding magic number but still same result. Thanks in advance
- Bot opening multiple trades when IF function included
- Magic Number
- trade at time
Jones John:
Hi guys, I have created a function for opening buy/ sell trades, but the EA opens more than 1 trades when I set the trade number 0 someone kindly help, I have tried adding magic number but still same result. Thanks in advance
Hi guys, I have created a function for opening buy/ sell trades, but the EA opens more than 1 trades when I set the trade number 0 someone kindly help, I have tried adding magic number but still same result. Thanks in advance
Use POSITION_SYMBOL and POSITION_TYPE to check the orders
Thanks let me try that
Jones John:
Hi guys, I have created a function for opening buy/ sell trades, but the EA opens more than 1 trades when I set the trade number 0 someone kindly help, I have tried adding magic number but still same result. Thanks in advance
Hi guys, I have created a function for opening buy/ sell trades, but the EA opens more than 1 trades when I set the trade number 0 someone kindly help, I have tried adding magic number but still same result. Thanks in advance
It depends on what you have in your events handling function which is not indicated here:
void OnTick() { // ... }
assuming that "int trades" is the number of trades that you want the ea to open, then, on 2nd last line of both functions, you have <=, which might need to be <, otherwise you have not added much code for us to analyse. It is most often the lines in your Event Handler that are the cause of this, and not your custom functions, so add more of your code for us.
I have the same issue. Any solution???
mwahab2000 #: I have the same issue. Any solution???
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We can't see your broken code.
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