Wednesday 25 January 2012

> Amibroker AFL writing


Simple Amibroker Formula Language (AFL) (Ver.1)

The following AFL is to combine Price Style, Order Type and color.

By price style I mean Open,High,Low and Close with Average,Volume and Open Interest(OI)
By order type I mean Line,Candle,Bar,Histogram,Staircase,Swing Dots etc.
By Color type I mean you can use your custom and default colors in Amibroker.

There are three different AFLs for the above functions but i have combined all the above
three in a single AFL.

The code as follows :

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
fld=ParamField("price Style",-1);
stl=ParamStyle("Order Type", defaultstyle=styleBar,mask=maskAll);
Plot( fld, "", ParamColor("Color-1", colorWhite),stl);
_SECTION_END();


No comments:

Post a Comment