PureBytes Links
Trading Reference Links
|
murthysuresh,
If you were writing to me, the answer is I don't know. I wrote to
support and showed them what I was trying to do, using a chart from
another program as an example, and they sent me back a PlotOHLC
command with a zero in the 3rd argument.
Perhaps they could answer your question. Here is the program I use
the PlotOHLC in:
///////////////////////////////////////////////////////////////
// Program : DPO With shading
// By : Bill Halliday
// Date : 2006-12-05
// From : A customized version of the 'DPO - Detrended Price
// Oscillator' Indicator found in:
// Program Files/AmiBroker/Formulas/Indicators that
// displays a shaded plot using styleCloud
//
// Initial Alterations:
//
// 1) This documentation.
// 2) Printf statement.
// 3) Changed the Plot to include shading.
//
// Revision: 2006-12-07
//
// Moved the Interpretation commentary to a "Status"
// 'if block' AND added line feeds to the Interpretation
// printf for display clarity.
// Define the DPO function
function DetrendedPriceOsc( Periods )
{
return C - Ref( MA( C, Periods ), -( 1 + Periods/2 ) );
}
// Start of program execution
// Call the dpo function
dpo = DetrendedPriceOsc( Param("Periods", 20, 1, 480 ) );
//Plot the DPO Indicator
PlotOHLC( dpo, dpo, 0,dpo , _DEFAULT_NAME(), colorLime,
styleCloud );
// Start Revision: 2006-12-07
if( Status("action") == actionCommentary )
{
// this printf prints information into the Interpretation Window
printf ( Interval(2) + " " + Name()+"("+FullName()+"):\n\n" +
"High " + H + ",\nLow " + L + ",\nClose " + C + ", \n\n" +
"dpo: " + DetrendedPriceOsc( Param("Periods", 20, 1,
100 ) ));
}
// End Revision: 2006-12-07
--- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@xxx> wrote:
>
> --- In amibroker@xxxxxxxxxxxxxxx, "halliday_mo" <halliday_mo@>
> wrote:
> >
> > If you haven't gotten your answer yet, change the 3rd "r" to 0 (a
> > zero) in the PlotOHLC statement.
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@> wrote:
> > >
> > > Hello
> > > I am still trying to understand how the stylecloud works. I
have
> > the
> > > following example where i am trying to plot the cmf in style
> cloud.
> > >
> > > i start off by getting a function cmf to return the cmf values.
> > > then i am using the plot ohlc to plot it in stylecloud. i
still
> > get
> > > only a line graph. can someone explain how the style cloud
works
> > and
> > > how i can make this one work properly.
> > >
> > > _SECTION_BEGIN("Chaikin Money Flow");
> > >
> > > function CMF(r1)
> > > {
> > >
> > >
> > > Graph0=Sum(IIf( H>L && V>0,((( C-L )-( H-C )) / ( H-L ))
> *V,0),r1) /
> > > Sum(V,r1);
> > >
> > > return Graph0;
> > > }
> > > r1=Param("Periods", 21);
> > > r=CMF(r1);
> > >
> > > SetChartOptions(0,0,ChartGrid30 | ChartGrid70 );
> > >
> > > Plot( r, "CMF", colorBlack );
> > > PlotOHLC( r,r,r,r, "", IIf( r > 50, colorRed, colorGreen ),
> > > styleCloud , 30, 70 );
> > >
> >
>
> Now that fix works. But what are these four parameters for?
> PlotOHLC uses OPen High Low Close. In my case O=H=C. L=0; how can
it
> map a nice chart like what i see. I am not getting this one in my
> head.
>
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.37/682 - Release Date: 2/12/2007 1:23 PM
|