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

RE: [amibroker] Addition



PureBytes Links

Trading Reference Links










Bit hard to see the formula in the GIF, colours are not
contrasting enough.

But I made similar post about this recently in the past 2
weeks.

So far nobody has responded to my memory, except a similar
one I made a long time ago when TJ said it had something to do with the way
numbers are stored in the OS. Same happens with decimals, they are not seen as
straight numbers as we see them. 5.4 can actually be 5.399968. I have a large
problem when I do rounding of numbers for box sizes in P&F charts. I have
had to force some numbers to read correctly to make the correct X or O on the
P&F. The example of 5.399968 is actually the real number of 5.4, but when I
have Floor function it pulls it back to 5.3. It may not sound much, but with
P&F charts if it should be 5.4 then a new X is created, but the number
inaccuracy stops this.

I work around this by using this to create the close price I
need for rising column in P&F . The main problem is only when the box size
is small <1.

<span
lang=EN-AU >CR = <font
size=2 color=blue face="Courier New">IIf<font size=2
color=black face="Courier New">(box==<font size=2
color=fuchsia face="Courier New">0.1<font size=2
color=black face="Courier New"> <font size=2 color=red
face="Courier New">AND<span
lang=EN-AU > (<font
size=2 color=blue face="Courier New">ceil<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >/box)*box-<font
size=2 color=blue face="Courier New">floor<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >/box)*box)><font
size=2 color=fuchsia face="Courier New">0<font size=2
color=black face="Courier New">,<font size=2 color=blue
face="Courier New">ceil<span
lang=EN-AU >(<font
size=2 color=red face="Courier New">C<font size=2 color=black
face="Courier New">/box)*box,<span
lang=EN-AU >floor<font
size=2 color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >/box)*box);

 

I have been trying to find a way to work around the large
numbers, but have not found a solution as yet

I did do a test of the large numbers to see what is actually
being stored. So I did this little test and found that the odd numbers were the
same as the previous even number. Both are seen as the same number when read
back from the computer memory

<font size=2 color=red
face="Courier New">Filter<span
lang=EN-AU >=<font
size=2 color=fuchsia face="Courier New">1<font size=2
color=black face="Courier New">;

<font size=2 color=blue
face="Courier New">AddColumn<span
lang=EN-AU >(<font
size=2 color=blue face="Courier New">frac<font size=2
color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">19000004<font size=2
color=black face="Courier New">/<font size=2
color=fuchsia face="Courier New">10<font size=2
color=black face="Courier New">),<font size=2
color="#cc4466" face="Courier New">""<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1.9<font size=2
color=black face="Courier New">); 

<font size=2 color=blue
face="Courier New">AddColumn<span
lang=EN-AU >(<font
size=2 color=blue face="Courier New">frac<font size=2
color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">19000005<font size=2
color=black face="Courier New">/<font size=2
color=fuchsia face="Courier New">10<font size=2
color=black face="Courier New">),<font size=2
color="#cc4466" face="Courier New">""<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1.9<font size=2
color=black face="Courier New">); 

<span lang=EN-AU
>AddColumn<font
size=2 color=black face="Courier New">(<font size=2 color=blue
face="Courier New">frac<span
lang=EN-AU >(<font
size=2 color=fuchsia face="Courier New">19000006<font size=2
color=black face="Courier New">/<font size=2
color=fuchsia face="Courier New">10<font size=2
color=black face="Courier New">),<font size=2
color="#cc4466" face="Courier New">""<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1.9<font size=2
color=black face="Courier New">);

<span
lang=EN-AU > 

<span
lang=EN-AU >Results

ADU    <font
 face=Arial>14/04/2003<font
face=Arial>    0.375000000      
0.375000000      0.625000000 

 

<span
lang=EN-AU >Wish I
had an answer



<font size=3 color=teal
face="Times New Roman">Cheers,
Graham

<font size=2
color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/ASXShareTrading

<font size=2
color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/FMSAustralia



<span
>-----Original Message-----
From: Dimitris Tsokakis
[mailto:TSOKAKIS@xxxxxxxxx] 
Sent: Monday, 14 April 2003 4:54
PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Addition

<font size=3
face="Times New Roman"> 



<font size=2
face="Times New Roman">Any idea to improve the
addition accuracy ?





<font size=2
face="Times New Roman">Dimitris Tsokakis



<font size=3
face="Times New Roman">



<font size=2
face="Courier New">Send BUG REPORTS to
bugs@xxxxxxxxxxxxx<span
>
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx 
(Web page: <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Your use of
Yahoo! Groups is subject to the Yahoo!
Terms of Service. 










Yahoo! Groups Sponsor












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.