
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
I think your problem is related to the fact that you missed asynchronous nature of the platform (and this is not a feature of your specific version of MT).
When you use several copies of EA simultaneously, each of them is running in a separate thread concurrently with other instances. So, basically, you use a multi-threaded software (a set of EAs), which is known as requiring a synchronization on global objects in order to prevent collisions. First thought is to use a global variable for this, that is you should read OrdersTotal only when current instance of EA "owns" the global variable. Maybe this article could help.
Please note that synchronization will also imply some time overheads. So if you want an optimized solution, the best thing to do is to refactor exiting EA (strategies) to run in a single copy to process all pairs.
Thanks Everybody for your help, especially Stanislav Korotky.
I just wrapped everything in a FOR loop. The FOR loop cycles though the 28 pairs, inside a timer event.
I don't know why some people frown on this approach, it runs solid as a rock.
Thanks again
Thanks Everybody for your help, especially Stanislav Korotky.
I just wrapped everything in a FOR loop. The FOR loop cycles though the 28 pairs, inside a timer event.
I don't know why some people frown on this approach, it runs solid as a rock.
Thanks again
What makes you think people frown on it ?
I frown at your earlier method running 28 separate robots.
It's common practice to convert it into one.
What makes you think people frown on it ?
I frown at your earlier method running 28 separate robots.
It's common practice to convert it into one.