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

Re: [amibroker] Re: AA vs. IB discrepancy



PureBytes Links

Trading Reference Links

Hello,

A couple of corrections to what was said here:

1.
First value of EMA is initialized with same length simple MA (_not_ AMA)

2.
OscP does NOT use this initialization (it computes like AMA)
(nor any other function except EMA)

More complex functions in AmiBroker do not call simpler ones to get intermediate values. 

For efficiency each built-in function is hand coded and hand optimized to achieve
maximum speed. 


3. As for the difference:

AA uses always ALL bars, while IB uses visible bars only plus a couple of other bars
before (and/or after) visible area.
Functions that are of recursive nature (that use previous bar value to compute
current bar value) like EMA, MACD, OscP, etc, etc theoretically need infinite number of bars. 
In practical terms we use fixed number of bars and accept some minor approximation
error such as 0.001% for example that is not visible on chart under any resolution.

If you however compare numerical values of the same recursive oscillator computer using
different amount of data you will be able to see the differences in some trailing decimal places.
This quite obvious and happens in all T/A platforms when you change the number
of bars loaded.

See http://www.amibroker.com/f?setbarsrequired
to learn how to ensure that all bars are used in IB.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Fred" <ftonetti@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, October 07, 2005 10:04 AM
Subject: [amibroker] Re: AA vs. IB discrepancy


> OscP is based on EMA's which in AB have a start up period before they 
> approach the same length AMA which imho is what an EMA should be from 
> the start.  Depending on how IB calculates EMA's, if you don't have 
> much data in AB then this could account for the difference.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <fimdot@xxxx> wrote:
>>
>> As mentioned in a previous thread, I am getting a discrepancy 
> between AA and IB for daily mutual fund data, although weekly is OK.  
> The data is OK with C in all fields.  Originally, I thought I solved 
> the problem by assigning C to O, H, L but upon further checking this 
> is not correct.  No matter what I try the daily AA is different from 
> the daily IB.  The attached gifs show the AA and IB results for the 
> Price Oscillator.  
>> 
>> The formula used for Osc is Osc = 100 * OscP(3, 10) and the AA 
> filter is Filter = Status("LastBarInRange").
>> 
>> Would appreciate it if someone would duplicate what I am getting 
> and, hopefully, find the cause for this discrepancy.  OscP() is a 
> price oscillator calculated by taking the difference between two 
> moving averages.  So why one timeframe works and one does not is 
> beyond me.
>> 
>> Bill
>>
> 
> 
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/