# The Modified Heikin Ashi Fibonacci Trading

I try to create a formula that calculate a modiefied Heikin Ashi described by
Avinash Khilnani in his book, but I don´t succeed.

I have an Excel-file that describes the calculation!

I tried to link this Excel-file to this topic, but can´t see that it´s possible.

I know that it is very much to ask for, but if someone could help me with this
formula I be very thankful.

Best regards,
Leif Axelson
Sweden

@AsaLeffe I am not familiar with your book and you have not listed any formula's so I don't see how anyone can help code them with you.

There are many posts in this forum with users discussing Heikin-Ashi. Search the forum as that might help or at least you will find other users with familiarity with the technique.

If you want to learn about Heikin-Ashi I suggest reading the books by Dan Valcu, the brains behind the Heikin-Ashi technique (and he is an AmiBroker user)
http://www.educofin.com/index.html

AmiBroker afl based upon Dan Valcu original Technical Analysis of Stocks and Commodities article

More articles from TASC that incorporate H-A with afl's.

7 Likes
``````_SECTION_BEGIN("Modified HA");
// Heikin Ashi described by Avinash Khilnani in book
// The Modified Heikin Ashi Fibonacci Trading System
///////////////////////////////////////////////////////////

SetChartOptions(0,chartShowArrows|chartShowDates);

HaClose[0] = (Open[0]+High[0]+Low[0]+2*Close[0]) / 5;
HaOpen[0]  = (HaClose[0] + Open[0]) / 2;
HaHigh[0]  = Max( High[0], Max( HaClose[0], HaOpen[0] ) );
HaLow[0]   = Min( Low[0], Min( HaClose[0], HaOpen[0] ) );

for (i=5; i<BarCount; i++)
{
HaClose[i] = (Open[i]+High[i]+Low[i]+2*Close[i]) / 5;
Haopen[i]  = (HaClose[i-1] + HaOpen[i-1]) / 2;
HaHigh[i]  = (Haopen[i]+HaOpen[i-1]+HaOpen[i-2]+HaOpen[i-3]+HaOpen[i-4])/5 ;
Halow[i]   = (HaClose[i]+HaClose[i-1]+HaClose[i-2]+HaClose[i-3]+HaClose[i-4])/5 ;
}

// Colors
upBar = HaOpen  < HaClose ;
downBar = HAOpen  > HAClose ;
barColor = IIf( upBar, colorGreen, IIf( downBar, colorRed, colorBlack ));

PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "HA", barColor, styleCandle ); //colorBlack
Title = Name()+" "+" Mod Heikin Ashi - Open: "+NumToStr(HaOpen,1.2,True)+" High: "+NumToStr(HaHigh,1.2,True)+" Low: "+NumToStr(Halow,1.2,True)+" Close: "+NumToStr(Haclose,1.2, True);

_SECTION_END();
``````
1 Like