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

RE: [amibroker] AA range settings



PureBytes Links

Trading Reference Links

Hi Graham,

Filter=1;
AddColumn(C,"",1.2);
AddColumn(DateNum(),"today",1);
AddColumn(Ref(DateNum(),-5),"5 period",1);
Buy=Sell=0;

Produces:
WIG20 03-05-26 1178.76 1030526 1030519

regardless of days/trading days setting (and it is 7 day difference!!!).

I think this is related to Ref function and the reason it looks back by Date
field (==quotation dates) not calendar (in fact it is true for EOD date, the
parameter in Ref() is related to number of bars).

>From Ref() in HELP:
"References a previous or subsequent element in a ARRAY. A positive period
references "n" periods in the future; a negative period references "n"
periods ago."

This is interesting. Thank you for pointing this out.

CU,
Marek

> -----Original Message-----
> From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]
> Sent: Tuesday, May 27, 2003 11:45 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] AA range settings
>
>
> Thanks Marek
> I understand the difference if you choose n=5 in the range.
> I guess I didn't explain it fully. I am exploring with n=1. I would have
> expected the difference between days and quotations to be still different.
> This is why I had the ref(x,-5)
> As a easy example if I want to just reference something over the
> past 5 days
> I have to keep in mind that it is actually referencing the last 5
> quotations
> regardless of the range setting. This can make a big difference
> to the way I
> would write the explorations
>
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
>
> -----Original Message-----
> From: Marek Chlopek [mailto:mchlopek@xxxxxxx]
> Sent: Tuesday, 27 May 2003 5:12 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] AA range settings
>
> Graham,
> DataNum() IMO should give always the same value as it is related
> strictly to
> calendar not to trading days.
> Explore this simple code in AA and you will find differences between days
> and quotations (5-day period starts 22/05 and 5-trading/quotation
> day period
> starts 20/05).
>
> Filter=1;
> AddColumn(C,"",1.2);
> Buy=Sell=0;
>
> All the best,
> Marek
>
> -----Original Message-----
> From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]
> Sent: Tuesday, May 27, 2003 11:05 AM
> To: AB yahoo group
> Subject: [amibroker] AA range settings
>
>
> I am currently checking the use using "n last quaotations" and "n
> last days"
> in the AA window and I am not certain if they are different.
> With padded data, ie no zero trade holes, then it should make
> absolutely no
> difference as every weekday is filled in.
> But with unpadded data, ie zero trade days are excluded,  I expected there
> to be a difference. But I have done a quick check using datenum()
> to make it
> easy and with 5 days and 5 quotations the results were the same for each,
> even if some days were not included.
> An example
> Today = 1030527
> 5 days ago 1030520
> If a day was not included both runs gave the same day, eg 1030519
> if one day
> no there.
> I would have expected that using 5 quotations would give me the
> 1030519, but
> 5 days would have been 1030520 as this is 5 trading days ago regardless of
> whether that stock traded or not during that period.
> Am I doing something wrong, can anyone advise me before I check
> with Tomasz
> and possibly waste his time.
>
> What I used was very simple
> Filter=1;
> AddColumn(DateNum(),"today",1);
> AddColumn(Ref(DateNum(),-5),"5 period",1);
>
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
>
>
> 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.
>
>
>
> 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/
>
>
>
> 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/




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/CNxFAA/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/