It's probably something in your code because i have no issues analyzing 40 currency pairs in a fast millisecond timer.
If I make a Profiling-Test it shows me two different things. In the Live Account the time is spend on copy buffer, but that seems to be no problem in the strategy tester.
Pictures
Strategy-Tester:
https://www.bilder-upload.eu/bild-d18e16-1579513272.jpg.html
Live:
https://www.bilder-upload.eu/bild-138b28-1579512841.jpg.html- Michael Heiter
- www.bilder-upload.eu
If you can post the code we can have a look.
Without code there is little we can do.
I don't know if it could be related. I had big problems when symbols in the MW window do not have enough data.
Using CopyBuffer with the symbols without enough history totally crashed my platform.
- 2019.12.12
- www.mql5.com
If you can post the code we can have a look.
Without code there is little we can do.
It has the form:
double Array1[];
double Array2[];
...
...
...
double Array10[]
OnTick{
For{ for all Symbols (36)
Code:
ArraySetAsSeries(Array1)
ArraySetAsSeries(Array2)
...
...
...
ArraySetAsSeries(Array10)
CopyBuffer(Array1,50)
CopyBuffer(Array2,50)
...
...
...
CopyBuffer(Array10, 50)
}//For
}//OnTick
It works on strategy tester but it spend all the time in CopyBuffer if the thing is live.
- www.mql5.com
That sounds like an idea. I will try this
I have tried it. It also spends the time in the CopyBuffer prozess. Overall that are only 36*50=1800 copies but it needs 30s?
Maybe you reduce the amount if calls.
But why is it fast in the Strategy-Tester and slow Live? Even if i calculate a year it only needs 1.5h for every tick which means I am in a microsecond range for the Live-trading but in fact it needs 10^6 times more time Live?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So I think that the program is not executed correctly because of the extremely slow execution, probably the "ticks" come in faster than my program can go into the next "mode" because the For loop is executed so extremely slow (30s instead of a few 100 microseconds).