Download MetaTrader 5

enhance a source intensive algorithm

To add comments, please log in or register
parham.trader
375
parham.trader  

Hi friends,

I'm using iCustom function to get the needed data and I want to put the received data in arrays, Here is the main problem :

As I mentioned I want to get the data from my indicator and store them in Arrays. The data would differ from one timeframe to other timeframe and each timeframe has 3 different setting in itself so if I want to put the data in arrays It will need 27 different arrays which is very source intensive and it doesn't seem logical to do so.

So I'd appreciate if anyone could guide me on using better approaches.

with my best wishes

whroeder1
16572
whroeder1  

27 different arrays is not resource intensive. 27 arrays * 1000 bars * 8 bytes is 216 kb. Hardly a problem on GB machines

Coping all values per tick would be. Only copy as much as you need, only on a new bar.

parham.trader
375
parham.trader  
whroeder1:

27 different arrays is not resource intensive. 27 arrays * 1000 bars * 8 bytes is 216 kb. Hardly a problem on GB machines

Coping all values per tick would be. Only copy as much as you need, only on a new bar.


Thank you so much for your guidance which was highly clarifying as always,

Although it is not resource intensive but it actually seems that it is not the most logical way to do so.

do you have any other solution for the above mentioned issue instead of creating 27 different arrays?

whroeder1
16572
whroeder1  
parham.trader: do you have any other solution for the above mentioned issue instead of creating 27 different arrays?
How could I? You haven't stated what indicator(s) or what you are doing with the values.
parham.trader
375
parham.trader  
whroeder1:
How could I? You haven't stated what indicator(s) or what you are doing with the values.


I've written an indicator like ZigZag indicator with very very little adjustments and I'm going to have the details of each extremum in arrays. For example dedicate an array to extremums price, another array to extremum candle number, another array to extremum time and so on. I want to have them all in my EA to make decision based on the stated details.

parham.trader
375
parham.trader  
whroeder1:

27 different arrays is not resource intensive. 27 arrays * 1000 bars * 8 bytes is 216 kb. Hardly a problem on GB machines

Coping all values per tick would be. Only copy as much as you need, only on a new bar.


Which of my laptop's hardware need to be improved so that I see no difficulty in executing my EAs and Indicators? CPU or RAM ?! 
honest_knave
Moderator
2293
honest_knave  
parham.trader:

Which of my laptop's hardware need to be improved so that I see no difficulty in executing my EAs and Indicators? CPU or RAM ?! 

Are you actually having any performance issues? You may be looking for a solution before you have a problem.
parham.trader
375
parham.trader  
honest_knave:

Are you actually having any performance issues? You may be looking for a solution before you have a problem.


Actually I haven't faced with any issue so far, but as I'm going to use so many "for" loops for each tick - as I described above - I might see some problem then.

by the way, I asked about the hardware for my own information.

To add comments, please log in or register