Ichimoku Kijun-sen
[[kijun_sen]] is the Ichimoku base line. It represents a medium-term equilibrium level computed from high and low prices. On each candle, the engine takes the highest high and the lowest low observed over the last 26 candles, then computes the midpoint between those two bounds.
This gives you a line that is slower and more stable than the Tenkan-sen. It does not follow price candle by candle like a traditional moving average. Instead, it describes the center of the market’s recent range. When it rises, that equilibrium zone is moving upward. When it falls, it is moving downward. When it turns flat, it often reflects a range-bound market or an area where price finds temporary balance.
The Kijun-sen is mainly used to position price relative to its medium-term equilibrium, identify dynamic support or resistance, or build logic around crossings with the Tenkan-sen. Here it corresponds to the standard Ichimoku version, with fixed parameters.
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.