PureBytes Links
Trading Reference Links
|
Thanks Graham for your comments. So for now the To Do list is as follows:
1) How to plot seasonality line 15 days into the future (as all the data is already known)?
2) How to improve the current imperfect method of referencing the data 252 bars ago (as there is never a consistent number of trading days per year).
3) PS: US symbol XAU comes from Phlx and not from Amex (as mistakenly stated in msg #94143).
Lesmond
-----------------------------------
From: Lesmond V <ebsn247lsm@xxx>
Now the next step is to get your original question answered:
how to plot seasonality line 15 days into the future (as all the data is already known)?
Anyone interested in seasonality issue who doesn't have continuous futures data can check out the following code with US symbol XAU (Phlx). Min 5 years of eod data is needed:
/**************************/
dp_y = 252; // days per year
ac5y = (Ref(C,-dp_y*5)+Ref(C,-dp_y*4)+Ref(C,-dp_y*3)+Ref(C,-dp_y*2)+Ref(C,-dp_y))/5; // day's avg 5yr Close
Plot(C, "", colorDarkYellow, styleCandle); // plot main candles
Plot(ac5y, "", colorViolet, styleOwnScale); // plot seasonality overlay
SetChartOptions(0, chartShowDates);
/**************************/
Lesmond
-----------------------------------
From: Graham <kavemanperth@xxx>
Just an observation, having written one myself is that you are just
referncing the data 252 bars ago. Over time you may find the reference
is not to the first bar of the year as there is never a consistent
number of trading days per year
True seasonality compares the 1st day with the 1st day, 2nd with 2nd
etc of each year.
--
Cheers
Graham
-----------------------------------
> --- In amibroker@xxxxxxxxxxxxxxx, "axle_d" <axle_d@> wrote:
> >
> > Lesmond,
> >
> > Nice catch, thanks for that. I've actually got it right in my AB but
> > wrote it wrong here. Again, thanks.
> >
> > Alex
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Lesmond V" <ebsn247lsm@> wrote:
> > >
> > > Very interesting, Axle. I found a little bug in your code from
> > message #93568:
> > >
> > > ref(C, -252*-2) should be: ref(C, -252*2)
> > >
> > > So here is the code again:
> > >
> > > /**************************/
> > > dp_y = 252; // days per year
> > > ac5y =
> > (Ref(C,-dp_y*5)+Ref(C,-dp_y*4)+Ref(C,-dp_y*3)+Ref(C,-dp_y*2)+Ref(C,-dp_y))/5;
> > // day's avg 5yr Close
> > >
> > > Plot(ac5y, "", colorViolet, styleOwnScale);
> > > /**************************/
> > >
> > > Lesmond
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "axle_d" <axle_d@> wrote:
> > > >
> > > > Mike,
> > > >
> > > > I have something you may be looking for. Note that I use 252 as the
> > > > numebr of trading days not a 365 day year lookback.
> > > >
> > > > Do a search on message #93568
> > > >
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "Mike Mann" <mikemann@> wrote:
> > > > >
> > > > > Has anyone built a seasonality tracker that compares the performance
> > > > > of a ticker in the same day,week,month in previous years to
> > determine
> > > > > seasonal pattern?
> > > > >
> > > > > Thanks, Mike
>
------------------------ 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/
|