I've a general question about the ChartSetSymbolPeriod && iCustom functions for a multi-currency & multi-timeframe system.
Considering the followings points :
- the time calculation of my custom indicator for each candle is : 1 ms.
- a candle calculation use previous candle results --> so for calculating correctly the last candle at time[0] I need to make 150 candle calculation (so : 150 ms)
- my system work with 50 symbols and 4 timeframes --> I use a loop and make 200 iCustom calls
- when I use the function ChartSetSymbolPeriod --> the indicators shall be recalculated.
Finally the entire time calculation of my multi system is 200*150 ms = 30 000 ms...... 30 sec !
So It is very problematic that the function ChartSetSymbolPeriod leads to indicators recalculations because each time I change of symbol or period on my graphic I have to recalculate the 150 previous candle for 200 symbols/timeframes.
Is there anyway to solve my problem ? I'm ok to make one time the entire calculation for my 200 iCustom calls but not for each time I use ChartSetSymbolPeriod function !
Additionnal question : At which moment the processor take time for calculating the custom indicator ? just after the iCustom call or when I use CopyBuffer function to retrieve the results ?
It's not an easy subject... thank you for your help !
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi,
I've a general question about the ChartSetSymbolPeriod && iCustom functions for a multi-currency & multi-timeframe system.
Considering the followings points :
- the time calculation of my custom indicator for each candle is : 1 ms.
- a candle calculation use previous candle results --> so for calculating correctly the last candle at time[0] I need to make 150 candle calculation (so : 150 ms)
- my system work with 50 symbols and 4 timeframes --> I use a loop and make 200 iCustom calls
- when I use the function ChartSetSymbolPeriod --> the indicators shall be recalculated.
Finally the entire time calculation of my multi system is 200*150 ms = 30 000 ms...... 30 sec !
So It is very problematic that the function ChartSetSymbolPeriod leads to indicators recalculations because each time I change of symbol or period on my graphic I have to recalculate the 150 previous candle for 200 symbols/timeframes.
Is there anyway to solve my problem ? I'm ok to make one time the entire calculation for my 200 iCustom calls but not for each time I use ChartSetSymbolPeriod function !
Additionnal question : At which moment the processor take time for calculating the custom indicator ? just after the iCustom call or when I use CopyBuffer function to retrieve the results ?
It's not an easy subject... thank you for your help !
Erwann.