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}

Perpustakaan Pine

Di dalam semangat sebenar TradingView, pengarang telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka, jadi pengaturcara-pengaturcara Pine yang lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau pada penerbitan-penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini di dalam penerbitan adalah ditadbir oleh Peraturan Dalaman.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Mahu gunakan perpustakaan ini?

Salin garisan ini dan tampalkan ia di dalam skrip anda.