[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] How to time align a custom array?



PureBytes Links

Trading Reference Links

I have arrays that hold the results of scoring and ranking a group of 
200 stocks over a 500 bar period. The arrays hold numbers, from 1 to 
200, for every bar, for each stock - which I then plot. These arrays 
are generated dynamically by retreiving the data from a binary file 
created using the Osaka plugin and stored on my hard drive. My question 
is - How do I time align this plot with the price chart? For instance, 
I generate the array to plot using (for j =0, j<= barcount-1, j++) and 
read each data element into my_ranked_array[j].  But if the binary file 
which holds the array elements, from which I'm reading in the data, was 
generated say 5 days ago, the plot created from my_ranked_array should 
end 5 days ago when I plot it. The problem is, it always plots up to 
the last bar in the price chart. Is there a way that I can time align 
this data beginning on the first date it was valid and ending on the 
last date it is valid , even if there are additional bars displayed on 
the current price chart? I realize that I can avoid this problem by 
generating a new binary file each day - but I would still like to be 
sure the data is being time aligned when I plot it.

Tom


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.10/624 - Release Date: 1/12/2007 2:04 PM