DefaultHighLowDataset: filtering data
Posted: Fri Nov 18, 2011 4:52 pm
I want to use DefaultHighLowDataset because I already have the relevant price and volume data in parallel straight arrays. However, my arrays have entries for non-trading days. Such entries have a legit Date, zero Volume, and NaN in the four price fields. DefaultHighLowDataset throws an exception on these days.
Is it spec that DefaultHighLowDataset throws for such days? if not, I'll dig into the exception more carefully.
My data arrays are used in my application and I need to keep the off-days in the list so indexing by day-counts works right. I could make a copy of the data, filtering out the off-days, and pass that to DefaultHighLowDataset.
But I wondered if there isn't some way to tell DefaultHighLowDataset to ignore off-days. The Date[] column is not part of my app, so I can modify that, so I tried setting it to null on off-days, but still DefaultHighLowDataset just throws.
(I don't want to use a Segmented timeline; I'm quite happy with having the off-days in the timeline and the chart; I just expect no OHLC or volume bars on those days.)
Thanks
JG
Is it spec that DefaultHighLowDataset throws for such days? if not, I'll dig into the exception more carefully.
My data arrays are used in my application and I need to keep the off-days in the list so indexing by day-counts works right. I could make a copy of the data, filtering out the off-days, and pass that to DefaultHighLowDataset.
But I wondered if there isn't some way to tell DefaultHighLowDataset to ignore off-days. The Date[] column is not part of my app, so I can modify that, so I tried setting it to null on off-days, but still DefaultHighLowDataset just throws.
(I don't want to use a Segmented timeline; I'm quite happy with having the off-days in the timeline and the chart; I just expect no OHLC or volume bars on those days.)
Thanks
JG