Graham,

Thank you.

I had originally tried coding the indicator the way you mentioned( 
see below). However, this code applies the same candle 5 times for 
each day in the week, rather than just one candle for each week. I 
guess this is because the interval is still daily on the worksheet 
tab.
I could just create another tab whose interval could be weekly and I 
could get the data i am looking for, however it would be nice to have 
the indicator available on the daily worksheet. I know it has been 
done for a monthly indicator, by Graham Kavanagh 
http://www.amibroker.com/library/formula.php?id=249


Am i doing something obviously incorrect? Am i missing something else?
I would the indicator to display in the title: weekdate, Open, high, 
low, close 


// Weekly Bar Chart in a worksheet with a daily interval
_SECTION_BEGIN("Weekly Graph");
TimeFrameSet( inWeekly );
wo = O;
wh = H;
wl = L;
wc = C;
TimeFrameRestore();
wo = TimeFrameExpand(wo,inWeekly);
wh = TimeFrameExpand(wh,inWeekly);
wl = TimeFrameExpand(wl,inWeekly);
wc = TimeFrameExpand(wc,inWeekly);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %
g, Lo %g, Close %g (%.1f%%) {{VALUES}}", wO, wH, wL, wC, SelectedValue
( ROC( C, 1 ) ) ));

PlotOHLC( wo, wh, wl, wc, "Weekly Close", colorBlack, styleCandle );
_SECTION_END();





--- In [email protected], Graham <[EMAIL PROTECTED]> wrote:
>
> You need to use timeframeexpand function to get the weekly to fit 
the daily
> chart
> eg
> wo = timeframexpand(wo,inweekly);
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> 
> On 16/09/06, Tony <[EMAIL PROTECTED]> wrote:
> >
> > Hi everyone... newbie here.
> >
> > I have been trying to test Dr Elders formula for Triple screen, 
for
> > which there is a AFL formula in the www.amibroker.com/library.
> >
> > There are indicators provided within the AFL script. However, the
> > Weekly chart indicator does not work correctly. The OHLC ranges 
are
> > not correct and are not displayed by weekdate. See below.
> >
> > // Weekly Bar Chart
> > //_SECTION_BEGIN("Weekly Graph");
> > //TimeFrameSet( inWeekly );
> > //wo = O;
> > //wh = H;
> > //wl = L;
> > //wc = C;
> > //TimeFrameRestore();
> > //PlotOHLC( wo, wh, wl, wc, "Weekly Close", colorCustom9, 
styleBar );
> > //_SECTION_END();
> > //_SECTION_BEGIN("EMA");
> > //P = ParamField("Price field",-1);
> > //Periods = Param("Periods", 15, 2, 200, 1, 10 );
> > //Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color",
> > colorYellow ),ParamStyle("Style") );
> > //_SECTION_END();
> >
> > I have been looking for a Weekly chart indicator which displays 
OHLC
> > by week in our user group and the AFL library. I can only find a
> > working monthly created by Graham Kavanagh 26 Dec 2002 in the
> > amibroker/library (very cool script that uses java script within 
the
> > AFL).
> >
> > The logic to build this indicator does not seem trivial. Does 
anyone
> > have a working version of a Weekly chart indicator which will 
work on
> > an EOD daily database? It would be beneficial to display in the
> > title: weekdate, Open, High, low, close.
> >
> > Thank you in advance for your help. We should post this indicator 
so
> > it is easily available for everyone.
> >
> > Tony
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>







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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

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



Reply via email to