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

Re: [amibroker] Re: setforeign bug



PureBytes Links

Trading Reference Links

Hello,

>
> How can data be misaligned? no matter what the value of aapl, on
> 1/2/2004, I expect qROC to be -.22 because it is calculated based on
> qqq data, not aapl.

Again - there is NO bug and the behaviour is correct (i.e. as documented)

Please do what I write. I am not brushing away.

So again:
Please do read the documentation
 http://www.amibroker.com/f?foreign

It says:
"Foreign function synchronizes the data file
you are referencing with the currently selected symbol.

Synchronization makes sure that EACH bar of FOREIGN data
matches exactly with each bar of currently selected symbol.

So if DateNum() function returns 990503 for given bar
then Close array represents the CLOSE of currently selected symbol at May 3, 1999
and Foreign("SYMBOL", "C") represents close of foreign symbol at May 3, 1999 TOO.

This is absolutely necessary because otherwise you won't be able
to do ANY meaningful operations involving both selected symbol and foreign symbol.

This also needed for the display so when you mark the quote with vertical
line it will always match the date displayed regardless if you use Foreign or not.

Please note that if you have data holes in currently selected symbol then in order to synchronize bars Foreign function will remove
bars that exist in Foreign symbol but do not exist in currently selected symbol."


Now if you have misaligned QQQ and AAPL data in three last bars you will GET
DIFFERENT results of your qROC.

So AGAIN PLEASE
Go to Tools->Database Purify, enter QQQ as reference symbol and
click "ANALYSE" and you will see.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "k_binder_" <k_binder_@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, October 06, 2004 4:13 PM
Subject: [amibroker] Re: setforeign bug


>
>
> Tomasz,
> Let me explain the situation again, in case you are just brushing
> this away as misaligned data again:
> there are 2 data streams, qqq and aapl. (This happens with all nasdaq
> 100 stocks for me).
>
> This is the formula:
> SetForeign("qqq");
>> > > qROC = ROC(Close, 3);
>> > > RestorePriceArrays();
>> > >
>> > > Filter = 1;
>> > > AddColumn(qROC, "QROC");
>
> when I "explore" this on qqq, I get a value of qROC=-.22 on 1/2/2004
> when I "explore" this on aapl, qROC on the bar after 1/2/2004 is -.22.
>
> How can data be misaligned? no matter what the value of aapl, on
> 1/2/2004, I expect qROC to be -.22 because it is calculated based on
> qqq data, not aapl.
>
> I would appreciate a quick reply to this problem.
>
> ken
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "k_binder_" <k_binder_@xxxx> wrote:
>>
>> tomasz,
>> This happens not only with aapl but also with other stocks. I just
>> gave you aapl as an example.
>>
>> I also use tradestation for intraday trading. I got the data from
>> tradestation and this same formula works fine with TS. Ofcourse, I
>> cannot test this at a portfolio level with TS, that's why I want to
>> use AB.
>>
>> ken
>>
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
> <amibroker@xxxx>
>> wrote:
>> > Hello,
>> >
>> > There is no bug, simply your data is misaligned.
>> > Check again because AAPL is for sure not updated to the same
>> > data as QQQ.
>> >
>> > Please read the documentation
>> > http://www.amibroker.com/f?foreign
>> >
>> > (about synchronizing arrays)
>> >
>> > Best regards,
>> > Tomasz Janeczko
>> > amibroker.com
>> > ----- Original Message ----- 
>> > From: "k_binder_" <k_binder_@xxxx>
>> > To: <amibroker@xxxxxxxxxxxxxxx>
>> > Sent: Wednesday, October 06, 2004 9:17 AM
>> > Subject: [amibroker] setforeign bug
>> >
>> >
>> > >
>> > >
>> > > I have a database with 2 stocks, qqq and aapl in it. Both are
>> daily
>> > > data for 2004, upto 9/3/2004. My layout has both charts in it.
>> > > I run the following code:
>> > >
>> > > SetForeign("qqq");
>> > > qROC = ROC(Close, 3);
>> > > RestorePriceArrays();
>> > >
>> > > Filter = 1;
>> > > AddColumn(qROC, "QROC");
>> > >
>> > > I find that when I "explore" aapl with this formula, "QROC" is
>> > > shifted back 1 bar. like ref(qROC, -1) instead of qROC. When I
>> select
>> > > qqq, everything is properly aligned.
>> > >
>> > > Has anyone experienced this?
>> > >
>> > > Any help will be appreciated.
>> > > thanks,
>> > > ken
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > Check AmiBroker web page at:
>> > > http://www.amibroker.com/
>> > >
>> > > Check group FAQ at:
>> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>> > > Yahoo! Groups Links
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/