Hi all
Is there a way for the active EAs to communicate with each other or for some hierarchy in the order they run . For example 5 EAs running on the same MT4, where in order for each one to run,it has to wait for the previous one to complete its operations.
What I think is to have the EAs create a textfile with a given number, where each of the EAs will be looking for if that file exists in order to begin to operate. If it does exist they will delete it and produce their own.
Can anyone provide a better alternative.
If you want to know what I am trying to achieve more specifically.
I wish to have an EA that automatically changes the chart symbol to the symbol of an active trade, when -that symbol did not have an active trade before.
-there is not an existing chart with that symbol active
I know I can write a function to loop through the active charts and trades and use the ChartSetSymbolPeriod() to change the chart when the above two conditions apply.
My difficulty however lies in the fact that I will apply it to 5 different charts and I want to avoid having all of them change to the same symbol at the same time when the above conditions apply. Hence if they were to executed in order.
Chart 2, will only change if Chart 1 is occupied with active trade. Chart 3 will change only if Chart 1 and Chart 2 are occupied with active trades and so on.
Hence the need for the communications between them or for some hierarchy in their execution.
Thank you