# Ichimoku Kinko Hyo

`ichimoku`

Five lines that show trend, momentum and support in one view.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| tenkan_period | int | 9 | 1 to 500 |
| kijun_period | int | 26 | 1 to 500 |
| senkou_b_period | int | 52 | 1 to 500 |

## Outputs

| Name | Kind |
| --- | --- |
| tenkan | value |
| kijun | value |
| senkou_a | value |
| senkou_b | value |
| chikou | value |

Warm-up: max(tenkan_period, kijun_period, senkou_b_period) - 1 bars (51 at the defaults).

Repaints: No.

## Formula

mid(n) = (highest high + lowest low over the last n bars) / 2

Tenkan = mid(tenkan_period), Kijun = mid(kijun_period)

Senkou A = (Tenkan + Kijun) / 2, Senkou B = mid(senkou_b_period)

Chikou = the close

The values are not displaced. The chart draws the two spans kijun_period bars ahead and Chikou kijun_period bars back; strategies read the values as they are.
