What are Heiken Ashi "better" candles?
The "better formula" was proposed in an article/memo by BNP-Paribas (In Warrants & Zertifikate, No. 8, August 2004 (a monthly German magazine published by BNP Paribas, Frankfurt), there is an article by Sebastian Schmidt about further development (smoothing) of Heikin-Ashi chart.)
They proposed to use the following :
(Open+Close)/2+(((Close-Open)/( High-Low ))*ABS((Close-Open)/2))
instead of using :
haClose = (O+H+L+C)/4
According to that document the HA representation using their proposed formula is better than the traditional formula.
What are traditional Heiken-Ashi candles?
The Heikin-Ashi technique averages price data to create a Japanese chart that filters out market noise.
Heikin-Ashi charts, developed by Munehisa Homma in the 1700s, share some characteristics with standard charts but differ based on the values used to create each candle. Instead of using the open, high, low, and close like standard charts, the Heikin-Ashi technique uses a modified formula based on two-period averages. This gives the chart a smoother appearance, making it easier to spots trends and reversals, but also obscures gaps and some price data.
What's going on with this indicator?
- First, we have the options to select the type: Regular, HA, HA Better
- Next, and to demonstrate the expanded source types, I've added a . In the drop down for the source you'll notice something very different from the typical TradingView source selector. Here's how to decode the new names for the sources:
- Close = close
- Open = open
- High = high
- Low = low
- Median = hl2
- Typical = hlc3
- Weighted = hlcc4
- Average = ohlc4
- Average Median Body = (open+close)/2
- Trend Biased = (see code, too complex to explain here)
- Trend Biased (extreme) = (see code, too complex to explain here)
... for HA and HA better, see the same set up as above but with different open and close values to calcualate the other source types
- For the HA better calculations, we run the close value through either an Adaptive, Kaufman, or T3 smoothing filter. The length for these smoothing filters, either 2 or 3, can be found in the code and is a constant value that shouldn't be changed. This smoothing is in inline with what is described in the article mentioned above
- Lastly, I've placed an over the oscillator so that the user can test out the various sources explained above
- Toggle on/off bar coloring
Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.