C
Use the function WindowsExpertName() that you can use as all or part of the OrderComment when you use OrderSend
Good Luck
-BB-
Presumably, each EA has it's own deciferable magic number... you can acces that easily enough and insert it in the comment with the order.
V
BarrowBoy:
C
Use the function WindowsExpertName() that you can use as all or part of the OrderComment when you use OrderSend
Good Luck
-BB-
great. that worked perfectly. thanks a lot!
WHRoeder:
New to everyone. Does not exist.
https://docs.mql4.com/windows/WindowExpertName
New to everyone. Does not exist.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 am working on a number of expert advisers and running them all in parallel on a demo account. at some times i have quite a few orders executed in parallel and it is rather difficult, without referring back to the logs all the time, to ascertain which EA initiated each of the orders. ideally i would like to insert something into the comment field of each EA which would identify the EA as well as the period of the associated chart. i would like to generate this identification string in an automated way. so, for example, if the EA is coded in the file runmean.mq4 and i am running it on a 15M chart then i would like to have a comment string like:
"runmean 15"
now i can easily get the time frame using Period(). what about the EA name? short of inserting the EA name directly into the code, is there not a programmatical way of accessing the EA file name?
thanks!
best regards,
andrew.