Hi Donald, Were you able to get solution to the above problem. I also have a similar problem if you could assist. Thanks
Hello Olufemi,
Yes, you can use Global Variables.
I am not on the laptop right now. But I will try to explain.
So, when you attach the EA on a chart (let's say EURUSD), the variable value will be 1. When you try to attach the same EA to other chart (let's say GBPUSD) it will not run because the variable is detected as 1.
But if you remove the EA from EURUSD, theb automatically the variable become 0, and the EA can be attached to GBPUSD.
You can see the code example on the mql book document. I also find it there.
If you still have problem, you can inform me later.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Wiseacre Mhlongo: You need to add this first: Hope it helps
Please read the previous posts! OP has already stated that he is not trying to restrict or protect his EA. Also, please use the SRC button!
At this point it is very unclear what the OP wants and between all the posts we have already covered 3 possibilities:
So now it is up to the OP to properly detail what he wants with some code examples.
Alright, thank you for your comments @Fernando Carreiro @Yohana Parmi @Wiseacre Mhlongo
It seems that I have to check option number 1 (as explained by @Yohana Parmi) with Global Variables. I am still working on it.
Thank you very much.
Alright, thank you for your comments @Fernando Carreiro @Yohana Parmi @Wiseacre Mhlongo
It seems that I have to check option number 1 (as explained by @Yohana Parmi) with Global Variables. I am still working on it.
Thank you very much.
Thanks
Alright, thank you for your comments @Fernando Carreiro @Yohana Parmi @Wiseacre Mhlongo
It seems that I have to check option number 1 (as explained by @Yohana Parmi) with Global Variables. I am still working on it.
Thank you very much.
Hi Donald, Were you able to get solution to the above problem. I also have a similar problem if you could assist. Thanks
Hi Donald, Were you able to get solution to the above problem. I also have a similar problem if you could assist. Thanks
this code will search "eur" and "usd" word in symbol(), so this code will work even if micro or zero account with suffix like "_m" , "m" , "z"
hope this will help.
this works very good with NZDUSD
but I want code to work with any NZD Pairs
like;
NZDUSD
NZDUSD#
#NZDUSD
NZDUSDm
NZDUSD.m
and also;
NZDCHF
NZDCAD
NZDJPY
and combination with #,m
so we can say that, "any symbol contains NZD inside of it"
How Can I do that?
thanks alot
Hello Fernando thanks for your help
this works very good with NZDUSD
but I want code to work with any NZD Pairs
like;
NZDUSD
NZDUSD#
#NZDUSD
NZDUSDm
NZDUSD.m
and also;
NZDCHF
NZDCAD
NZDJPY
and combination with #,m
so we can say that, "any symbol contains NZD inside of it"
How Can I do that?
thanks alot