PureBytes Links
Trading Reference Links
|
Hello Bromba,
Nice work with the addition to the Export.js Thanks.
I also noticed you had some large values in the export VOHLCx.
Which made me think of exporting composites.
So I passed an Integer of larger than 4 digits though, Needless to say -
The extra digits were truncated.
Here is a revised version of your code - To include any integers greater
than 4 digits.
I hope it works ok <grin>
return
str.substring(0,((str.indexOf(".")==-1)?(str.length-3):0)+str.indexOf(".")+4);
KR
Michael.
>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/
|