kurtsmock

Dead Simple Heikin Ashi Candles (HA Candles)

kurtsmock Zaktualizowano   
Are you looking for a dead simple calculation of the Heikin Ashi candles as they are calculated in tradingview? Here it is!

I was looking through the library and I saw that many have come up with a lot of awesome scripts using heikin ashi candles. But, I can't find anywhere that had the straightforward simple version of how Tradingview calculates them. This was a problem for me because I realized after punching the formula in that TradingView doesn't calculate HA candles in the original way.

You might say they don't calculate them the "right" but, spoiler alert, there is no right in trading. You can only be rational or irrational as you make money or lose money.

This is useful to me for building out some portions of an algo that are not going to be compatible with the built-in function. It happens. So, if you were looking for it too, hopefully it saves you some time.

For reference the original calc of HA candles is:
o = (prev_HA_open + prev_HA_close) / 2
h = math.max(high, ha_open, ha_close)
l = math.min(low, ha_open, ha_close)
c = ohlc4 

Trade Well.
Informacje o Wersji:
Added Color modification capability by request.
Informacje o Wersji:
AAAAAnnnddd there was a typo in the code. 🤦

Before I die I hope that just once I can publish something that doesn't immediately require an update. lol

Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?