PureBytes Links
Trading Reference Links
|
Mark, this means that your browser or e-mail program doesn't copy/paste properly. Just make manual corrections where necessary. I've just copied the formula from message #93339 and it works fine. Also, in case you need a test data you can find some in message #93331.
Lesmond
--- In amibroker@xxxxxxxxxxxxxxx, "aajohnah" <aajohnah@xxx> wrote:
>
> Tried it and get an error myself with the code like that
>
> Error 29
> Variable "f_lo" used without being initialized
>
>
> Mark
>
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> Of Lesmond V
> Sent: Monday, February 06, 2006 4:59 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Daily Candlestick Mutual Fund Chart
>
> Thank's a lot, Graham. That solves all problems. Here is the full code, if
> anyone else wants to try. I personally hate those mutual fund charts
> constructed with lines or tiny dashes.
>
> /**********/
> f_op = IIf(BarIndex() > 0, Ref(C,-1), C); // fund's open price
> f_hi = Max(f_op, C);
> f_lo = Min(f_op, C);
>
> PlotOHLC(f_op, f_hi, f_lo, C, "", colorDarkYellow, styleCandle);
>
> Title = Interval(format=2)+" "+Date()+" O="+f_op+" C="+C;
> /**********/
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >
> > the first bar will be messy because there is no bar to the left of it
> > try
> >
> > O=IIf(BarIndex()>0, Ref(C,-1),C);
> >
> > Plot(C, "", colorWhite, styleCandle);
> >
> >
> >
> > --
> > 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 2/6/06, Lesmond V <ebsn247@> wrote:
> > > I'm trying to plot daily eod mutual fund chart in candlesticks. As
> mutual fund data has "close" only the rules are as follows:
> > >
> > > - open = yesterday's close
> > > - high = max( yesterday's close, today's close)
> > > - low = min( yesterday's close, today's close)
> > > - close = today's close
> > >
> > > The following code doesn't work properly. The first bar on the left is
> messed up because of "Ref(C,-1)" and all bars don't show OHLC as expected.
> It looks like Barindex() function or a loop is needed somewhere here. Help
> appreciated:
> > >
> > > /**********/
> > > f_op = Ref(C, -1); // fund open price
> > > f_hi = Max(f_op, C);
> > > f_lo = Min(f_op, C);
> > >
> > > PlotOHLC(f_op, f_hi, f_lo, C, "", colorDarkYellow, styleCandle);
> > > /**********/
> > >
> > > Here is a sample mutual fund data:
> > >
> > > Ticker,Date/Time,Open,High,Low,Close,Volume,Trades,
> > > FHG%BUA,06-01-09,9.8114,9.8114,9.8114,9.8114,0,0
> > > FHG%BUA,06-01-10,9.8314,9.8314,9.8314,9.8314,0,0
> > > FHG%BUA,06-01-11,9.8514,9.8514,9.8514,9.8514,0,0
> > > FHG%BUA,06-01-12,9.7814,9.7814,9.7814,9.7814,0,0
> > > FHG%BUA,06-01-13,9.8014,9.8014,9.8014,9.8014,0,0
> > > FHG%BUA,06-01-16,9.8014,9.8014,9.8014,9.8014,0,0
> > > FHG%BUA,06-01-17,9.9414,9.9414,9.9414,9.9414,0,0
> > > FHG%BUA,06-01-18,9.9414,9.9414,9.9414,9.9414,0,0
> > > FHG%BUA,06-01-19,9.9414,9.9414,9.9414,9.9414,0,0
> > > FHG%BUA,06-01-20,9.7614,9.7614,9.7614,9.7614,0,0
> > > FHG%BUA,06-01-23,10.0114,10.0114,10.0114,10.0114,0,0
> > > FHG%BUA,06-01-24,9.9614,9.9614,9.9614,9.9614,0,0
> > > FHG%BUA,06-01-25,9.8914,9.8914,9.8914,9.8914,0,0
> > > FHG%BUA,06-01-26,10.0414,10.0414,10.0414,10.0414,0,0
> > > FHG%BUA,06-01-27,10.2814,10.2814,10.2814,10.2814,0,0
> > > FHG%BUA,06-01-30,10.4514,10.4514,10.4514,10.4514,0,0
> > > FHG%BUA,06-01-31,10.4500,10.4500,10.4500,10.4500,0,0
> > > FHG%BUA,06-02-01,10.4600,10.4600,10.4600,10.4600,0,0
> > > FHG%BUA,06-02-02,10.3800,10.3800,10.3800,10.3800,0,0
> > > FHG%BUA,06-02-03,10.3800,10.3800,10.3800,10.3800,0,0
>
------------------------ 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/
|