-
long order_ticket; if (order_ticket==OrderGetTicket(i)
Of course, order_ticket has no value. The comparison ("==") is nonsense. Perhaps you meant to assign the value to the variable from the function call ("=") and then check the result for non-zero?
-
OrderSend(request,result);
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 (MT5/MT4+strict), it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum (2012)
return value of OrderSend should be checked - Expert Advisors and Automated Trading - MQL5 programming forum (2022)
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles (2014)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use