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
In "big" programming they use mutex
Thanks, didn't know about it. It's a cool thing, if you use mutex name to convey meaningful information.
but it's almost an analogue of the global variable in MT4. it does not solve my problem: after starting the mutex first, it can create the EA that was "second" and it has not been allowed to work.
damn - the name of the subject is wrong, but I don't know how to phrase it in a few words :(
Why not use this, the simplest option? The Expert Advisor creates a control file and checks for the existence of the file before doing so. If the file of the same name already exists, the EA will not start. If the EA exits the chart correctly, it will erase the file. If a crash occurs, the remaining file blocks the launch of any instance of the EA and it is deleted manually in order to continue working.
And this is the point - when the terminal crashes . another EA looks into the file - sees not its ID and crashes...
If you don't want it in a file, write it in the registry - also your topic, by the way.
Damn - the name of the topic is wrong, but I don't know how to phrase it properly in a few words :(
Well, like, "How to limit the work of the EA (no more than one working instance)?"
Well, like, "How to limit the work of the EA (no more than one working copy)?"
that's the thing: no :(
How to ensure that the EA only works on the chart where it was first dropped
Do I have to beg you? :) I've already suggested a solution to your problem. If you don't even want to read the replies, why did you create the topic in the first place?
Do I have to beg you? :) I've already suggested a solution to your problem.
Do I have to beg you? :) I've already suggested a solution to your problem. If you don't even want to read the replies, why did you create the topic in the first place?
Sorry, I didn't notice your third option (with object identifier) - I must have been flooded with messages after it and didn't pay attention started replying to them and ..... :(
The third is a development of the second. Everything works.
I use the simple first one more often.
They want the code ready, working and tested.
+101
who wouldn't want that? ;)
Well, I already have a solution algorithm (of course, it's a crutch), but the realizable - I can do it myself.
Option three is to link to a specific chart by creating an identifying (or resolving) graphic object on that chart.