-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. -
OrderSelect does not return a ticket (tcket) number.
Check your return codes, and report your errors (including market prices and your variables). Don't look at GLE/LE unless you have an error. Don't just silence the compiler (strict), it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum 2012.05.20
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles 25 March 2014 - If you actually find what you are looking for, you increment count to one and return that. Put your return outside the loop, and return the count.
- texoro: always gives me 0 you can tell me where the error isElsewhere.

- 2020.03.12
- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
But I printed the result but it always gives me 0 you can tell me where the error is