[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Chart



PureBytes Links

Trading Reference Links

You might prefer this chart (with 5 day Simple MA):

http://img228.imageshack.us/img228/6431/statchart3zj.png

The formula is below.

Lester

/****START****/

dyn_col = IIf(C>Ref(C,-1),34,IIf(C<Ref(C,-1),32,37)); // used to show Net colour in the Title
net_chg = NumToStr(C-Ref(C,-1),1.3); // used to show Net value in the Title

f_o = 0;

Title = "\\c11"+Interval(format=2)+" "+Date()+"\\c-1  O="+f_o+"\\c26 C="+C+
"\\c11  "+FullName()+EncodeColor(SelectedValue(dyn_col))+"  N="+net_chg;

t_t = ToolTip="O = "+f_o+"\n"+ToolTip="C = "+C;

PlotOHLC(f_o, H, L, C, t_t, colorDarkYellow, styleCandle);
Plot(MA(C,5), "", colorRed, styleLine);

SetChartOptions(0, chartShowDates);

/****END****/


--- In amibroker@xxxxxxxxxxxxxxx, "Lester Vanhoff" <ebsn247lsm@xxx> wrote:
>
> As far the chart format itself is concerned, yes. This type of plot can be created using style constant:
> 
> styleArea = 16384 - area chart (extra wide histogram)
> 
> http://www.amibroker.com/guide/h_indbuilder2.html
> 
> It is usually used with indicators. Here is example how it looks with Parabolic SAR (that's why you can see some negative values):
> 
> http://img114.imageshack.us/img114/18/stylearea6mq.png
> 
> The question of statistical calculations that you need done is another matter. AB could probably handle them as well.
> 
> Following is the code for the SAR chart. You should be able to customize it to your own needs:
> 
> // SAR Histogram
> 
> sar_hg = C - SAR();
> sar_hg_d2 = NumToStr(sar_hg, 1.2); // SAR hgm value with 2 deciml digits (shown in the Title)
> dyn_col = IIf(sar_hg > 0, 34, IIf(sar_hg < 0, 32, 37)); // SAR hgm value colour (shown in the Title)
> 
> Title = "C-SAR(0.02,0.2) = " + EncodeColor(SelectedValue(dyn_col)) + sar_hg_d2;
> 
> Plot(sar_hg, "", dyn_col, styleArea);
> PlotGrid(0, 26);
> 
> // colours: 26=colorDarkYellow, 34=colorLime
> 
> // END
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Ryan Daniel <basejumpers@> wrote:
> >
> > Is it possible to create the following chart in AmiBroker through AFL?
> > 
> > I have a friend that wants to buy AmiBroker but needs to be able to 
> > create
> > 'statistical' type charts using market data.
> > 
> > If possible, how would we go about it?
> > 
> > http://finance.ph.groups.yahoo.com/group/amibroker/photos/view/4396?b=1
> > 
> > 
> > Thank you.
> > 
> > Ryan Daniel
> > basejumpers@
> > http://finance.groups.yahoo.com/group/basejumpers/
> >
>