Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Steps to Custom-Coding your Amibroker Charts

 Open a formula editor with a blank workspace.


 Name the formula “whatever you like!”
 Copy and Paste the following code into your editor:

//Market Environment Filter AFL///

SetChartOptions(0,chartShowArrows|chartShowDates);

LTBANDS = Param(“LTBANDS”,200,50,500,1);

STBANDS = Param(“STBANDS”,50,2,100,1);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%)
Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Plot( C, "Close", IIf(C >= BBandTop(C,LTBANDS,0.5) AND C >=


BBandTop(C,STBANDS,0.5),colorGreen,IIf(C > BBandTop(C,LTBANDS,0.5),colorLime,IIf(C <
BBandTop(C,LTBANDS,0.5)

AND C >= BBandBot(C,LTBANDS,0.5),colorBlue,IIf(C <= BBandBot(C,LTBANDS,0.5) AND C <=


BBandBot(C,STBANDS,0.5),colorRed,IIf(C <= BBandBot(C,LTBANDS,0.5),colorPink,colorBlack))))),
styleCandle | ParamStyle("Style") | GetPriceStyle() );

//////////////////////////////////////////

 Open a new chart pane


 Click “apply” on your formula editor

You might also like