Sorry, please ignore that garbage
Oops, what a dummy. the ticket number won't disappear in the event of a system crash, and will always be available.
Six demerits to me :(
- Why did you post your MT4 question in the
Root /
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. - When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your (original) post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - You'll have to cast the Get to an int.
- It's not persistent storage unless you flush the GV.
- It's unnecessary. Remember it in a global/static variable. On restart, recover it.Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 and MetaTrader 4 - MQL4 programming forum
MagicNumber: "Magic" Identifier of the Order - MQL4 Articles
whroeder1:
Thanks for the advice. Sorry about posting in the wrong place, I'll be more careful next time. Looks like I have some reading to do :)
- Why did you post your MT4 question in the
Root /
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. - When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your (original) post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - You'll have to cast the Get to an int.
- It's not persistent storage unless you flush the GV.
- It's unnecessary. Remember it in a global/static variable. On restart, recover it.

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
Hi,
I'm not sure if this will work
Can I make the ticket number a GlobalVariable?