Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Heikin Ashi for Amibroker (AFL)
kaiji
almost 15 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 18)
Tags:
amibroker, heikin

Heikin-Ashi Candlesticks are similar to normal Japanese candlesticks but with a few differences to eliminate some of the noise. Heikin-Ashi Candlesticks combine the open-close prices from the previous period with the open-high-low-close data from the current period to create a new candlestick chart type. By combining the two together the new candlestick chart is able to filter out some of the noise present in the price. Heikin-Ashi candlestick can be used to quickly identify periods of trend and potential points of reversal.

Screenshots

Similar Indicators / Formulas

Heikin-Ashi
Submitted by mlnd1986 over 14 years ago
Heikin Ashi Easy System
Submitted by felippemiranda almost 11 years ago
heikin ashi with KPL system
Submitted by viplavmba about 14 years ago
Heiken Ashi Candlestick Oscillator
Submitted by xawarr over 13 years ago
TTM Trend Clone
Submitted by kaiji almost 15 years ago

Indicator / Formula

Copy & Paste Friendly
SetChartOptions(0,chartShowArrows | chartShowDates);

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 ) ); 
xDiff = (HaHigh - Halow) * 10000;
barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed);
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );

25 comments

1. MTRIG

Heikin-Ashi is one of the best charts to look at to quicky determine the trend.

MTR Investors Group is the only web site where you can find Heikin-Ashi charts online.

Heikin-Ashi at MTRIG.com

2. avram

This is one of the best indicators I have come accross. Thanks.

3. marti80

Do you have Metastock formula?

4. administrator

This can’t be coded in Metastock. Metastock does not allow one to create custom charts.

5. RAMSES

Very nice indicator. Thanks!

6. nightingale2k1

perfect indicator but use it wisely :)

7. mahnooj

Great indicator…..Thanx..

8. reaz

Fatafatii .. enjoyable indicator

9. sandek007

IS IT POSSIBLE TO CHANGE THE COLOR OF THE CANDLE TO PLOT INTRADAY HIGH AND LOW IN A DIFFERENT COLOR OTHER THAN GREEN OR RED, SO THAT IT IS EASY TO SPOT WHEN INTRADAY HIGH AND LOW WAS FORMED.THANKS

10. Wach

Heikin-Ashi is great tool, if the trend is your friend then get this indicator. They bring youthful energy to old good candlesticks.

11. jayakumar1975

Heikin-Ashi is great tool, thank you very much

12. najem14

Very nice

13. ROAHIT160

how to use it?
mail me at rohit.singh160@gmail.com

14. legendkiller420

Good one..Go on with this kind of Indicators

15. halfman

Heiken Ashi is a good and powerful indicator. To use it, you can try as I suggest.

1. When the trend is up, focus on candle’s body. I usually ignore the shadow since the body will give more informations. Whenever the body become smaller, it indicates weakening.

2. When the trend is down, focus on the candle’s shadow. I usually ignore the body since the shadow will give more informations. Whenever the shadow become longer, it indicates 2 signal : continuation or reversal.

Combine it with your other favorit indicator to get the best result. Hope this can be helpful.

FYI, don’t bother to consider Heiken Ashi as Japanese Candlestick because both works in quite different ways.

16. bobaloo

Thanks…Been looking for an HA for Amibroker

17. manojin1

Chart show good, I try then Comment

18. ritvikshankar

Hi,
Can someone tell me how to plot buy sell signals for heikin ashi?
Meanin that it buys when candle turns green and sell when red…

19. morgen

ritvikshankar, add this:

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
//FORMULE
stochup= StochK()>StochD() ;
MACDup= MACD()>Signal() ;
Hist= MACD()-Signal() ;
Histup= Hist>Ref(Hist,-1) ;
HAup= HaClose>=HaOpen ;
BuyHa= HaClose>=HaOpen ;
SellHa= HaClose<HaOpen ;
//======================================================================

//PARAMTOGGLE

// This combines indicators into one timing Signal
//function ParamOptimize( description, default, minv, maxv, step )
//    { return Optimize(description, Param(description,default, minv, maxv, step ), minv, maxv, step ); }
tgl = ParamToggle("Result", "AND logic|Compare");
// switch test calculation and compare the results
if(tgl)
{
myBuy = BuyHa AND macdup AND histup AND stochup ;           
myShort = SellHa AND !histup AND !stochup ;            
}
else
{
myBuy   = IIf( HaClose>=HaOpen AND MACD()>Signal() AND Hist>Ref(Hist,-1) AND StochK()>StochD()      ,1,0) ;                                                                       
myShort = IIf( HaClose<HaOpen  AND Hist<Ref(Hist,-1) AND StochK()<StochD()     ,1,0);
} 

Buy = ExRem(mybuy,myshort);
Sell = ExRem(myshort,mybuy);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,haLow,Offset=-15);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,haHigh,Offset=-15);
20. mjorg

Has anyone bought the CD “Heiken-Ashi How to trade without Candlestick Patterns” from this site:
http://www.educofin.com/index.html

If so is it worth it?

Thnx

Marty

21. prakashmodak

HI

I added the buy and sell formula, but it gives error on lin3 35 Col 64.
Saying that Variable hihigh used without having been initialized.

Please acknowledge.

Thanks
Prakash Modak

22. prakashmodak

Hi

Please ignore previous comment, now its working fine. I have just changed the variable same as (hiHigh to HiHigh) which you have assigned in main code.

can you help me in another logic? need help in designing AFL based on AROON.
please contact on prakash.modak65[at}gmail{dot]com
Thanks

23. prakashmodak

Hi
Can some one tell me how to use two colors in on HA candle i.e. in down turn it Red and Green and in up trend its Blue & Green in the same candle. for reference you can see the the YouTube https://www.youtube.com/watch?v=zN712u1Ma5s
Please post me details if you have on prakash.modak65@gmail.com

24. Sadik Shaik

morgen how simple u wrote that code for buy sell.. great.

I’m new to afl’s.

25. mhjwisestocktrader

add this to your code:

HaOpen = IIf(IsNull(HaOpen) OR IsNan(HaOpen) OR HaOpen==0 , Ref(HaOpen , 1) , HaOpen);

under HaOpen definition.

Leave Comment

Please login here to leave a comment.

Back