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

RE: [amibroker] Displaying decimal places....



PureBytes Links

Trading Reference Links

Hello,

Again sample code at http://www.amibroker.com/f?categorygetsymbols
was for illustrating the use of categorygetsymbols. It never supposed to
be the same as ATC. And the code is of course correct (all exchanges do the
same when calculating indices in case of symbol was not traded the price
from previous day is taken for calculations and they do NOT change the divider)

Anyway it is purely academical and I have already said all that I wished to say
on this topic.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, February 29, 2004 11:29 PM
Subject: [amibroker] Re: The reason


> Tomasz,
> The example in GetCategorySymbols() function DOES NOT GIVE THE SAME 
> RESULT with ATC calculation.The reason is simple, the method [and the 
> principle] of calculation is different. It is not consistent to have 
> two different results for the same quantity.
> 
> Let us suppose 3 stocks in WL20, XX1, XX2 and XX3. 
> I hope we agree that the definition of the average is (C1+C2+C3)/3, 
> where C1, C2 and C3 are the respective Close values FOR EACH BAR.
> Let the last XX3 bar be {empty}
> ATC method will give
> ATCaverage=(C1+C2)/2, where C1 and C2 are the last XX1, XX2 close 
> values
> The example method will give
> ExampleAverage=(C1+C2+C3p)/3, where Cp is the last available XX3 
> Close, which is padded to the next, empty bar.
> Since (C1+C2)/2 is not equal to (C1+C2+C3p)/3,  one of these results 
> should be wrong.
> Since we have ONLY TWO STOCKS for the last bar, the ATCaverage is 
> correct and according to the average definition.
> The ExampleAverage is wrong for 3 reasons
> a. It is not equal to ATCaverage
> b.C3p does not exist, it is an hypothetical artificial value you add 
> in Foreign() structure for some reasons.
> c.3 is wrong as a divider, there are ONLY TWO STOCKS for the last bar.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
> wrote:
> > Dimitris,
> > 
> > As for the example in the User's Guide - www.amibroker.com/f?
> categorygetsymbols
> > the only purpose of this example was to show how to use 
> CategoryGetSymbols 
> > and it DOES produce correct result because it uses default fixup 
> value which is TRUE
> > (so all data holes are PADDED then).
> > Hence the code is NOT affected by the fixup=false issue discussed 
> earlier.
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message ----- 
> > From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Sunday, February 29, 2004 11:21 AM
> > Subject: [amibroker] Re: The reason
> > 
> > 
> > > Tomasz,
> > > Well, this is good news !
> > > Now, if we suppose AAPL is missing the last 5 quotations, then 
> the 
> > > graph of
> > > f=Foreign("AAPL","C",0);
> > > Plot(f,"F",1,1);
> > > is wrong.
> > > We could have the correct graph NOW[before the 4.52 version],with 
> > > G=IIf(IsNull(Ref(f,-1)),Null,F);
> > > Plot(G,"G",4,8);
> > > But this correction is not enough for the CategoryGetSymbols() 
> > > example in the 4.50 users guide. The use of i in the last 
> division 
> > > return Average / i; 
> > > is also wrong, i counts the names of the WL [the elements of the 
> > > comma separated string] and  does not give the daily population 
> of 
> > > the WL.
> > > I hope it is clear now, the discussion was a bit boring for the 
> > > readers but, never mind.
> > > The best solution for any user is to spend some time and fill the 
> > > holes of his/her database.
> > > Dimitris Tsokakis
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" 
> <amibroker@xxxx> 
> > > wrote:
> > > > Hello,
> > > > 
> > > > Your descriptions were unclear to me unfortunatelly and I was 
> not 
> > > able to see your point.
> > > > As for D2/D4 values they are copies of last valid data point 
> but 
> > > they indeed should be Null as well
> > > > when fixup is set to False (0). This issue will be addressed in 
> > > version 4.52.
> > > > 
> > > > Best regards,
> > > > Tomasz Janeczko
> > > > amibroker.com
> > > > ----- Original Message ----- 
> > > > From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Saturday, February 28, 2004 10:06 PM
> > > > Subject: [amibroker] Re: The reason
> > > > 
> > > > 
> > > > > Tomasz,
> > > > > How do you explain D2=22.47 ?
> > > > > How do you explain D4=22.47 ?
> > > > > All D1 to D5 should be {empty}, since the last 5 AAPL 
> quotations 
> > > are 
> > > > > deleted.
> > > > > The above D2, D4 are totally absurd.
> > > > > Just curious,  don't you see it ??
> > > > > fixup=0 does not work as described, a value equal to the last 
> > > > > available pops up every 2nd bar [!!!!!]
> > > > > Dimitris Tsokakis
> > > > > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" 
> > > <amibroker@xxxx> 
> > > > > wrote:
> > > > > > Dimitris,
> > > > > > 
> > > > > > It explained in the User's Guide: 
> http://www.amibroker.com/f?
> > > foreign
> > > > > > 
> > > > > > "The last parameter - fixup - accepts following values 
> > > > > >   a.. 1 - default value - causes filling the holes in the 
> data 
> > > with 
> > > > > previous values, 
> > > > > >   b.. 0 - the holes are not fixed
> > > > > > [..]
> > > > > > If you do not use fixup=True, data holes will have the 
> value of 
> > > > > Null [..]"
> > > > > > 
> > > > > > Null is the other name for {EMPTY}.
> > > > > > 
> > > > > > Best regards,
> > > > > > Tomasz Janeczko
> > > > > > amibroker.com
> > > > > >   ----- Original Message ----- 
> > > > > >   From: Dimitris Tsokakis 
> > > > > >   To: amibroker@xxxxxxxxxxxxxxx 
> > > > > >   Sent: Saturday, February 28, 2004 3:49 PM
> > > > > >   Subject: [amibroker] The reason
> > > > > > 
> > > > > > 
> > > > > >   is the peculiar result of Foreign("AAPL","C",0);
> > > > > >   I deleted the last 5 bars and here is the plot of
> > > > > >   Plot(Foreign("AAPL","C",0),"",1,8);
> > > > > > 
> > > > > >   The last 6 dots are 
> > > > > > 
> > > > > >   D0= 22.47
> > > > > > 
> > > > > >   D1= {EMPTY}
> > > > > > 
> > > > > >   D2= 22.47
> > > > > > 
> > > > > >   D3={EMPTY}
> > > > > > 
> > > > > >   D4= 22.47
> > > > > > 
> > > > > >   D5={EMPTY}
> > > > > > 
> > > > > >   There is no explanation for D2, D4, AAPL values were 
> {EMPTY} 
> > > for 
> > > > > these dates.
> > > > > > 
> > > > > >   Am I missing something ?
> > > > > > 
> > > > > >   Dimitris Tsokakis
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >   Send BUG REPORTS to bugs@xxxx
> > > > > >   Send SUGGESTIONS to suggest@xxxx
> > > > > >   -----------------------------------------
> > > > > >   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 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ------------------------------------------------------------
> ----
> > > ----
> > > > > ----------
> > > > > >   Yahoo! Groups Links
> > > > > > 
> > > > > >     a.. To visit your group on the web, go to:
> > > > > >     http://groups.yahoo.com/group/amibroker/
> > > > > >       
> > > > > >     b.. To unsubscribe from this group, send an email to:
> > > > > >     amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > > > > >       
> > > > > >     c.. Your use of Yahoo! Groups is subject to the Yahoo! 
> > > Terms of 
> > > > > Service.
> > > > > 
> > > > > 
> > > > > 
> > > > > Send BUG REPORTS to bugs@xxxx
> > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > -----------------------------------------
> > > > > 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 
> > > > > Yahoo! Groups Links
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > 
> > > > >
> > > 
> > > 
> > > 
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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 
> > > Yahoo! Groups Links
> > > 
> > > 
> > > 
> > >  
> > > 
> > >
> 
> 
> 
> 
> 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 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 


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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/