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

Re: [amibroker] Export help -- suplement



PureBytes Links

Trading Reference Links

hello,

I've seen around some posts considering errors in quotations when using 
export.js file. I don't know if any solution has ever been posted.

it is at least problem where one of OHLC values is an integer. I 
couldn't verify other errors because this is the only error I get.

in function FormatFloat(number) just change the following line:

return str.substring( 0, str.indexOf(".") + 4 );

to

return str.substring(0,((str.indexOf(".")==-1)?1:0)+str.indexOf(".")+4);

indexOf() function returns position of "." if there is any ".", 
otherwise it returns -1. hence the problem with integers without ".": -1 
+ 4 = 3 and numbers are cut by 1.

here are some results before (incorrect value 655)
INDU,1997-4-8,111500,655,6551.38,6546.09,6546.09,19

and after (correct value 6551)
INDU,1997-4-8,111500,6551,6551.38,6546.09,6546.09,19

maybe someone will find this info useful,
cheers,
BM


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/