|
Change Interactive Financial Chart Daily Start/End Time? |
Posted by David Bluestein on Mar-25-2011 00:21 |
|
I'm looking at the Interactive Financial Chart 1 day graph, and trying to see how I would
change it from 9:30 am - 4 pm to 8:00 am - 6 pm. It seems like that needs to happen
down in $db->getTimeStamps(), which is the compiled object.
Am I missing something here? Or can I change the start end time for daily data outside of
getTimeStamps? |
Re: Change Interactive Financial Chart Daily Start/End Time? |
Posted by Peter Kwan on Mar-25-2011 14:34 |
|
Hi David,
If your data are from 8:00am to 6:00pm, then the chart will show 8:00am to 6:00pm. Basically, it just shows the information in your data. Would you mind to clarify are the data from your database really from 8:00am to 6:00pm?
Are you using the random number generator in the sample code? The random number generator only generates intraday data from 9:30am to 4:00pm. In your real system, the data come from your code, and you can freely use timeStamps from 8:00am to 6:00pm.
Hope this can help.
Regards
Peter Kwan |
Re: Change Interactive Financial Chart Daily Start/End Time? |
Posted by David Bluestein on Mar-25-2011 21:11 |
|
Hey Peter-
I adapted the random data generator, but am still using:
$db = new FinanceSimulator($ticker, $startDate, $endDate, $resolution);
$timeStamps = $db->getTimeStamps();
which gives me timestamps that start at 9:30. Should I not use this built in method and
use my own to generate the timestamps? I then take the timestamps and look for data in
the database for each one (for 8:00-8:01, find value; for 8:01-8:02, find value, etc.,
except getTimeStamps starts at 9:30).
Thanks-
David |
Re: Change Interactive Financial Chart Daily Start/End Time? |
Posted by Peter Kwan on Mar-26-2011 00:03 |
|
Hi David,
All data, including the timeStamps, should come from your database. It is not expected you using the random number generator in your real application.
When you perform a database query, you can ask the database to return a column containing the timeStamps, in addition to columns for high, low, open, close and vol.
Hope this can help.
Regards
Peter Kwan |
|