Questions from Beginners MQL5 MT5 MetaTrader 5 - page 548
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
I'd hate to show the code, as the first version proved to be very survivable. It survived for 10 years without optimisation. Now I want to make it a bit more complex and profitable.
The code is very simple.
Still, orders may be opened on every tick because of an error in the logic.
Check before you open a position to see if it is already open or not.
Before closing is like this.
Right?
It goes something like this.
It's better to make it into a function.
Before closing is like this.
It goes something like this.
No, the problem has not been solved. it is not in this unit.
Can you please explain the difference between my option and yours?
No, the problem has not been solved. it is not in this unit.
Can you please explain the difference between my option and yours?
Then you are doing something wrong, work out your code.
Mine is better :)
...
This way you won't miss any order. In your version, if at that moment some position is closed or an order is deleted, you can skip any of the remaining ones.
So you're doing something wrong, deal with your code.
Mine is better :)
...
This way you won't miss any order. If your version shows that if at that moment some position is closed or an order is deleted, then you can skip some of the remaining ones.
I declared it as a global variable, but it gives me an error.
int CountOrder;
I declared it as a global variable, but it gives an error.
What I have written to you is a function.
Here's an example of how to use it.
What I have written to you is a function.
Here is an example of how to use it.