Is there any time benefit to using an array to store high and low info as opposed to just reading the high and low info using high(-n) and low(-n) every time a new bar is detected?
Let's say you need the high and low info for 50 bars on a 1 minute chart. Would it be faster to get the high and low info for each of the 50 bars in a for loop every time a new bar is detected, or load an array with 50 bars of high and low info just once and then rotate the info in the array, dropping off the oldest bar info and adding just the new bar high and low to the other end of the array?
Dale
Let's say you need the high and low info for 50 bars on a 1 minute chart. Would it be faster to get the high and low info for each of the 50 bars in a for loop every time a new bar is detected, or load an array with 50 bars of high and low info just once and then rotate the info in the array, dropping off the oldest bar info and adding just the new bar high and low to the other end of the array?
Dale
Comment