Ichimoku Tenkan-sen
[[tenkan_sen]] is the Ichimoku conversion line. It represents a short-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 9 candles, then computes the midpoint between those two bounds.
This gives you a fast line that reacts quickly to changes in market rhythm. It does not follow price candle by candle like a traditional moving average. Instead, it describes the center of the shortest recent range used by Ichimoku. When it rises or falls quickly, that short-term equilibrium is moving quickly as well. When it turns flat, it often reflects a slowdown in the move or a market entering a range.
The Tenkan-sen is mainly used to read immediate market momentum, compare that short-term equilibrium with the Kijun-sen, or build logic around their crossings. Here it corresponds to the standard Ichimoku version, with fixed parameters.
Block declaration
A strategy can contain multiple [[tenkan_sen]] blocks. The block outputs one numeric series (the Tenkan‑sen). This block is a fixed donchian_mid alias with length=9 and offset=0. No source parameter is required because this block always uses the high and low input series.
Examples
Minimal setup
[[tenkan_sen]]
id = "tenkan"Parametric variant with donchian_mid
If you need to vary length or offset, use [[donchian_mid]]. [[tenkan_sen]] does not accept them.
Parameters
| Parameter | Description |
|---|---|
idString Required | Identifier of the Tenkan‑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:
[[tenkan_sen]]
id = "tenkan"Then:
| Variable | Description |
|---|---|
tenkan ortenkan[0]Decimal | Current Tenkan‑sen value. |
tenkan[n]Decimal | Tenkan‑sen value from n candles ago. |
tenkan.high_sourcetenkan.low_sourceString | Names of the input series. |
tenkan.symbolString | Market used. |
tenkan.timeframeString | Timeframe used. |
Notes
- Numeric variables can be combined freely (arithmetic, comparisons, logical operators).
- Text variables are intended for equality/inequality comparisons.