loxx

Better Heiken-Ashi Candles w/ Expanded Source Types [Loxx]

loxx Actualizado   
Better Heiken-Ashi Candles w/ Expanded Source Types is an indicator to compare regular candles to traditional Heiken-Ashi candles to "better" Heiken Ashi candles. This indicator and comparison study appears an oscillator. The purpose of this indicator is to demonstrate a better way to calculate HA candles and also to demonstrate expanded source types. This indicator is meant to be used by advanced Pine Coders who wish to add fine-tuning to their indicators and strategies.

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 candlestick chart that filters out market noise.

Heikin-Ashi charts, developed by Munehisa Homma in the 1700s, share some characteristics with standard candlestick charts but differ based on the values used to create each candle. Instead of using the open, high, low, and close like standard candlestick 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 candlestick type: Regular, HA, HA Better
- Next, and to demonstrate the expanded source types, I've added a simple moving average. In the drop down for the SMA 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 SMA over the oscillator so that the user can test out the various sources explained above

Included:
- Toggle on/off bar coloring
Notas de prensa:
Small display error. Please remove from your chart, reload TV and re-add.

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?