Pages

Friday, January 15, 2010

Heikin - Ashi Charts - A better way of Candle Charts

Standard Japanese candle charts are created with OHLC(Open, High, Low and Close prices). Heikin-Ashi uses a modified OHLC values, which gives a clean look to the charts by eliminating the disturbances and by projecting the trend. See the two charts below.


Standard candlestick chart

Heikin-Ashi candlestick chart





Here is the formula(AFL) to create Heikin-ashi chart for amibroker users.

HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "Modified " + Name(), colorBlack, styleCandle );
_SECTION_BEGIN("MA15");
P = ParamField("Price field",-1);
Periods = Param("Periods", 9, 2, 200, 1 );
Plot( MA( HaClose , Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

No comments:

Post a Comment