How to ensure that the EA only works on the chart where it was first dropped - page 3

 
Techno:
If it's the same eespert with different parameters, you can ..... it's all clear.
But what if they all have the same parameters? ;) that's how it works for me: there's ex4 and it has some default parameters (including magik!) I launch it and change nothing - it works. now I launch the second one and change nothing either - the magiks are the same :((
 
sanyooooook:
Well, there's the line, whoever's at the till rules.)
oh, shit..... i can put a number on my hand and when i receive money, i can request a number one on my hand. where should i put this number in MT4? ;)
 
ForexTools:
oh shit.... you can write the number on the palm of your hand in the queue and ask for the palm with the number one when you receive the money. but where do i write this unit in mt4?!!! ;)

into a file, or into a global variable, the variable name depends on the EA settings
 

Option two - whoever works first works first.

Record ID and time of the last activity. At start check if identifier is ours - execute code, if identifier is someone else's and time of activity is several ticks ago, then take control, otherwise it won't work.

 
Option three is to link to a specific chart by creating an identifying (or enabling) graphic object on that chart.
 
ForexTools:
What if it's just one? ;) that's how it works for me: ex4 has some default parameters (including magik!) I launch it and change nothing - it works. now I launch a second one and change nothing either - the magiks are the same :((

Well I wrote above how to do it if everything is exactly the same. You generate a number in sleep(), the first one wakes up, he reads and deletes the global variable and works, in the deinit again sets it.
 
Candid:
The fact of availability of the EA should be reflected in the terminal configuration, which is where you should check for clones. By the way, you can insure against renaming, if the correct name does not appear in config, then goodbye. But I didn't work with terminal configs, I think such things are written in chr files, but it should be checked if it is controlled in real time.

Hmm, strange, it's not the first time I've seen this effect. A specific prescription is offered, the reaction is zero, neither confirmation nor denial, the discussion continues to simmer around the same old points.

What would that mean? Is there a goal substitution and the answer to the original question is no longer a priority? For example, I am really more interested not in whether my idea will work or not, but in this phenomenon :)

 
Techno:
well i wrote above how to do .... first one to wake up is ....

I don't need a lottery! I myself manually determine who is the first (the one I reset first). it's the only one that should work. all tricks with remembering something or other break with uncertainty when restarting the terminal and recompiling the EA when there are several attached (you don't know which init has worked).

(If it exists - we work. The problem is that each chart has OWN list of objects and I cannot check existence of objects in another one :(((

to make it short: i need a connection of a specific chart with a specific EA, which will "survive" both the restarts of the terminal and recompilation

 
Candid:

Hmm, strange, it's not the first time I've seen this effect. You offer a specific recipe, the reaction is zero, no confirmation.

your idea doesn't work, especially since you have nothing but an idea (not to mention a "concrete recipe")

Candid:
The fact of availability of the EA should be reflected in the terminal configuration, that's where you should check for clones. By the way, you can insure against renaming, if the correct name does not appear in config, then goodbye. But Ididn't work with terminal configs, I think such things are written in chr files, but it should be checked if it is controlled in real time.

what can i make of your "solution" ?? ;)

"Should" does not mean "will", "there" is "where"? If "didn't work" - how can you advise untested solutions?

 

The EA will ask, for example, if the account number has been started.

The EA will ask, for example, to start the account number so-and-so's pair. In response, the EA receives an initialisation permission.