Rank: Newbie
Groups: Registered, Registered Users Joined: 5/30/2006(UTC) Posts: 1 Location: Maryland, USA
|
I think I need
some help with MetaStock File Library API in the Developer’s Kit.
I am looking for
a utility to read data from MetaStock and input into a MySQL database. My
database will retain 3 years of historic data.
I buy my data
from Reuters DataLink and use MetaStock’s Downloader 9.1.
In addition to
updating MySQL for each day’s new close data, I also need to update MySQL for
funds that have had their historic data adjusted by Reuters when a dividend or
a capital gains distribution is paid out (and subsequently the price goes down,
like with a stock split). In other words, is there
an alternative to converting every day the 3-year history for 18,000 funds?
This is probably
a common need, but it is new for me and I cannot find something to do it.
(The programming would be beyond my skill and time.)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 10/3/2006(UTC) Posts: 2
|
I have the same need.... an aplication would be awesome !
But I think its possible to convert the CSV files (exported from downloader) into a simple MySQL query that insert the data into the database.
any thoughts ?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/16/2005(UTC) Posts: 93 Location: Maryland,US
|
I have not used MySQL very much, but I do use Micro$oft SQL 7 & 2000 quite a bit. Exporting the data from the downloader would work great as long as your table is formatted the same way. Identify how long you want to export on downloader. One issue with SQL I ran into on another project is with the date & time columns. I used the DateTime type. Each column will have both a date & time. The date column will have the accurate date, but some funky time. The time column, if used, will have the correct time but the dates will be the same.
If you are going to want to update previous dates you are either going to have to compare each value with the imported data and update if necessary or wipe the entire table and enter all the current data.
Again - I rarely use MySQL, but I assume there is similar functionality to the M$ version of the enterprise manager. Imports take about 5 clicks if your import file is formatted, which it would be from the downloader.
If you are a db god this might be an easy path to success. I know enough to get by, so I am trying to learn better coding for metastock language as strange as it might appear {compared to other programming languages}.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The "funky time" usually comes from the intraday data where the format is hh (for hours) mm (minutes) [censored] (ticks in that minute, NOT seconds!!) The whole answer is in the MDK manual, if yuo have it?
So the question is how to get around this? I did a project where the client didn't need super-accurate times, so we divided the minute into 2000 segments and wrote a tick into each segment (see the manual for why we needed more than 1000 segments) and output this to the file.
Hope this helps.
wabbit [:D]
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.