Library "lib_hlm"
Ichimoku trend line and plotting tools.

HLM(Period)
  Optionless Ichimoku/Donchian trend line calculation.
  Parameters:
    Period: The period for the trend line calculation.
  Returns: The midpoint of the highest high and the lowest low.

HLM_Offset(offset, currentIsZero, intoPast)
  Standardized language for plotting offsets.
  Parameters:
    offset: The offset number to use.
    currentIsZero: `true` for ichimoku counting. `false` for natural language
    intoPast: `true` if projecting backwards. `false` if projecting forwards.
  Returns: The offset adjusted by counting style and direction.

TK()
  Calculates the Ichimoku Tenkan and Kijun lines.
  Returns: {tenkan, kijun}

SenkouSpans(period_1, period_2, period_3)
  Calculates the Ichimoku Senkou Span A and Senkou Span B values.
  Parameters:
    period_1: default=9
    period_2: default=26
    period_3: default=52
  Returns: {senkou_a, senkou_b}

Ichimoku_Cloud(period_1, period_2, period_3)
  Calculate the Ichimoku cloud value and offsets.
  Parameters:
    period_1: default=9
    period_2: default=26
    period_3: default=52
  Returns: {senkou_a, senkou_b, cloud_offset}

Chikou_Span()
  Gets the chikou span and offsets.
  Returns: {chikou, chikou_offset}

Ichimoku(enabled)
  Get the values for the full, default Ichimoku system, including plotting offsets. Common toggle for all values.
  Parameters:
    enabled: `true` will return plottable values. `false` will return only na's (turns off plotting).
  Returns: {tenkan, kijun, senkou_a, senkou_b, cloud_offset, chikou, chikou_offset}

Ichimoku_Line_Colors()
  Get a set of colors with a common transparency for Ichimoku.
  Returns: {tenkan_color, kijun_color, senkou_a_color, senkou_b_color, chikou_color}

Ichimoku_Cloud_Color()
  Determines the cloud color and applies transparency (Ichimoku).
  Returns: the dominant lines color with applied transparency

Ichimoku_Colors()
  Gets a full set of default ichimoku colors with cloud color based on the input senkou values.
  Returns: {tenkan_color, kijun_color, senkou_a_color, senkou_b_color, chikou_color, cloud_color}

Thư viện Pine

Với tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác từ cộng đồng của chúng tôi có thể sử dụng lại nó. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này một cách riêng tư hoặc trong các ấn phẩm mã nguồn mở khác, 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 chung.

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 thư viện này?

Sao chép văn bản vào khay nhớ tạm và dán nó vào tập lệnh của bạn.