Ichimoku Kijun-sen
[[kijun_sen]] produces the Ichimoku baseline with its fixed 26-candle period. On each candle, it finds the highest high and the lowest low over that window, then returns the midpoint between those two extremes.
The Kijun-sen therefore describes the center of the recent range. Unlike a moving average, it does not average every price in the period: only the upper and lower bounds determine its value. The line rises or falls as the midpoint of those extremes shifts, and remains flat while that midpoint is unchanged.
Block declaration
A strategy can contain multiple [[kijun_sen]] blocks. The block outputs one numeric series (the Kijun‑sen). This block is a fixed donchian_mid alias with length=26 and offset=0. No source parameter is required because this block always uses the high and low input series.
Examples
Minimal setup
[[kijun_sen]]
id = "kijun"Parametric variant with donchian_mid
If you need to vary length or offset, use [[donchian_mid]]. [[kijun_sen]] does not accept them.
Parameters
| Parameter | Description |
|---|---|
idString Required | Identifier of the Kijun‑sen series. |
symbolString or Array Optional | Market symbol(s) from which this block reads high and low candles. If omitted, the block inherits the [backtest] symbol. For symbol format, arrays, and alignment rules, see Exchanges, Symbols and Timeframes. |
timeframeString or Array Optional | Timeframe on which this indicator is computed. If timeframe is omitted, the computation uses the grid’s main timeframe defined in [backtest].For accepted formats and timeframe alignment rules, see Exchanges, Symbols and Timeframes. |
Available variables
Use the identifiers below directly in your expressions.
Assume the block is configured as:
[[kijun_sen]]
id = "kijun"Then:
| Variable | Description |
|---|---|
kijun orkijun[0]Decimal | Current Kijun‑sen value. |
kijun[n]Decimal | Kijun‑sen value from n candles ago. |
kijun.high_sourcekijun.low_sourceString | Names of the input series. |
kijun.symbolString | Symbol used. |
kijun.timeframeString | Timeframe used. |
Notes
- Numeric variables can be combined freely (arithmetic, comparisons, logical operators).
- Text variables are intended for equality/inequality comparisons.