foo[1518776791280] = 1;
Those two are contradictory. If foo is a int array (4 bytes per element) your array is 5.6 GB in size. You'll need twice that must RAM for a copy. Better rethink what you're trying to do.
no :D i dont have a SPARC T5 at home .... you misunderstood it. I want a walking time index for a value x. The timestamp has 14 counts integer, where i actuelly just need the first 9 integer.
The array will start like at timestamp 1518776791280:
foo[1518776791280] = 1;
And the end of the array would be 60 sec later.
Each time i add a new value, a old value will be deleted.
My question is, can i create a array with a starting index id which is 9 || 14 integer long ? Is there any limitation of the index ?
Or is there a better way of creating a walking array ? I don't want to copy the entire array each time i add a new value.
-
Don't double post!
General rules and best pratices of the Forum. - General - MQL5 programming forum - Christian Stern: The array will start like at timestamp 1518776791280:
What part of it can't was unclear?
Marco vd Heijden: Total amount of elements in the array cannot exceed 2147483647. - Christian Stern: And the end of the array would be 60 sec later.Use the second part of the timestamp

- 2017.06.07
- Vasiliy Sokolov
- www.mql5.com
https://www.mql5.com/en/articles/3047
@nicholishen -> ur my hero :D thank you
I knew the articel but never had a closer look. Now, until i can define what i want, i have a different view to this articel and i found a easy ( way too easy) cpu/memory saving way to have a bunch of ring buffers.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i want to create a walking FILO ( first in, last out ) time buffer where i use the symbol timestamp as array index value. Does anyone know if there is any impact of performance using a 14 count array index value ?
Example
Or i substr the first 5 integer and limit the max array size to 9. Guess i will never have 9,9Mio values in a array.
But i guess, this is easier as to copy the entire array ( -1 item ) into a new array and add the new element.When i use the copy method i also have the create a seperate matching array for time reference of this values. With this solution i can save code and memory, so far it is working.
What do you think ?