loxx

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

loxx Cập nhật   
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
Phát hành các Ghi chú:
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
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?