PureBytes Links
Trading Reference Links
|
Hello,
I have recently received several e-mails from Australian
customers having problems
with EggData.com data provider and AMiBroker's MS plugin.
This was interesting becasue MS plugin is used worldwide by hundreds of
users without
any problem.
After some debugging session I found out that EggData does not follow MS
format specifications
in .DAT files.
EggData has invalid format of the .DAT file header, which
looks like this:
<IMG alt="" hspace=0
src="gif00442.gif" align=baseline
border=0>
Note single space and then "EggData.Com Data
File".
Now correct Metastock 7 field (Date,O,H,L,C,V,OI) file format
should begin with
two 16 bits integers representing maximum number of records
and last valid record
u_short
max_recs; /* 0 ==> unlimited size
*/ u_short last_rec;
/* dathdr7 = 1; ctdata7 starts with 2 */
followed by 24 zero bytes, as show below:
<IMG alt="" hspace=0 src="gif00443.gif"
align=baseline border=0>
Now importer works because it ignores "last_rec" field and reads all
records.
Plugin on the other hand uses "last_rec" field to learn how many bars
should be skipped
if "Number Of Bars to load" in File->Database Settings is less than
number of bars in MS database.
Since in EggData file LastRec field contains 0x6767 hex sequence (from
letters 'gg') that is equal to 26471 (decimal)
the plugin thinks that there are 26471 data bars in this file
and tries to skip 25471 (if you have selected 1000 bars to read).
Clearly EggData does NOT follow the METASTOCK format
specifications.
Workaround is simple: just go to File->Database
Settings and instead of X number of bars
enter 26471 or more. The best is to enter say 30000 in
Number of Bars to load.
Note: this does not change the fact that EggData are
NOT compatible with Metastock format.
Best regards,Tomasz
Janeczkoamibroker.com<FONT
size=2>
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Attachment:
Description: ""
Attachment:
Description: ""
|