- New MetaTrader 5 platform build 3081: Improvements in MQL5 services and design updates
- Question for developers - using all computational cores during optimisation
- error=1 when take profit
I tested my EA system and found that when calling the system indicator, the CopyBuffer step will take a lot of time, and the time for calling the number of 1000 and 10 is the same. Does anyone know what causes this problem?
Your first call to copy buffer contents, will require the indicator to do its first major total calculations on all the bars. This first call takes time, irrespective of if you need 1000 bars or only 10.
In subsequent calls, it only needs to do the incremental calculations so it is much faster,. So write your code to take this into consideration.
Your first call to copy buffer contents, will require the indicator to do its first major total calculations on all the bars. This first call takes time, irrespective of if you need 1000 bars or only 10.
In subsequent calls, it only needs to do the incremental calculations so it is much faster,. So write your code to take this into consideration.
Thank you!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use