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}

Biblioteca do Pine

No verdadeiro espírito TradingView, o autor publicou este código de Pine como uma biblioteca de código aberto para que outros programadores de Pine de nossa comunidade possam reutilizá-lo. Um brinde ao autor! Você pode usar esta biblioteca em particular ou em outras publicações de código aberto, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Gostaria de usar essa biblioteca?

Copie a seguinte linha e cole-a em seu script.