PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxxxxxxxxxxxxx, "awbe2005" <awbe2005@xxx> wrote:
>
> I was trying this code for my needs:
>
> _SECTION_BEGIN("HLC chart no open");
>
> // Get Previous Day's close, Low and High
> Prev_Close = TimeFrameGetPrice( "C", inDaily, -1, expandFirst);
>
> Color = IIf(Prev_Close < C, colorRed, colorBlack);
>
> PlotOHLC(C,H, L, C, "O == C Chart", Color, 128);
> _SECTION_END();
>
> It doesn't work as expected though.
> I'd like to have red bars when current close is lower than previous
> close and black bars when current close is higher than previous one.
> At least that should be how it works on stockcharts.
>
> Plus it would work just on a daily frame and I need it to work on
> every frame.
>
>
All you need is to get the previous bar instead of previous
daily bar ... so just change "Prev_Close".
//////////////////////////////////////////
_SECTION_BEGIN("HLC chart no open");
// Get Previous Bar's close, Low and High
Prev_Close = ref(C, -1);
Color = IIf(Prev_Close < C, colorRed, colorBlack);
PlotOHLC(C, H, L, C, "O == C Chart", Color, 128);
_SECTION_END();
//////////////////////////////////////////
BTW, if you want HLC chart with no open price tic, one
way to do it is:
PlotOHLC(Null, H, L, C, "HLC Chart", Color, stylebar);
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "awbe2005" <awbe2005@> wrote:
> >
> > Thank you very much.
> > What is 128 for?
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Thomas Z." <tzg@> wrote:
> > >
> > > Hi,
> > >
> > >
> > >
> > > PlotOHLC(C, H, L, C, "O == C Chart", colorBlack, 128);
> > >
> > >
> > >
> > > Thomas
> > >
> > > www.PatternExplorer.com
> > >
> > >
> > >
> > > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> > On Behalf
> > > Of awbe2005
> > > Sent: Saturday, September 13, 2008 12:56 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Bar chart without openprice
> > >
> > >
> > >
> > > Hello everyone,
> > > can anyone post some code to get a bar chart without open price,
> > like this
> > >
> >
>
<http://stockcharts.com/h-sc/ui?s=GBN&p=D&yr=1&mn=0&dy=0&id=p36964279287>
> > > one.
> > > Thanks in advance.
> > > Best regards,
> > > Deviad
> > >
> >
>
------------------------------------
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|