This script is a Multi-Timeframe Ichimoku Table indicator for TradingView, written in Pine Script version 6. It provides a table displaying Ichimoku trend signals for different timeframes: 1-minute, 3-minute, 5-minute, and 15-minute. Here’s a breakdown of what the script does:
1. Indicator Setup
The script starts by defining a non-overlay indicator (i.e., it will be shown separately from the main price chart).
2. Ichimoku Calculation Function
The function f_ichimoku(_tf) computes the Tenkan-sen (Conversion Line) and Kijun-sen (Base Line) for a given timeframe.
It does this by taking:
The highest high and lowest low over the past 9 periods (Tenkan-sen).
The highest high and lowest low over the past 26 periods (Kijun-sen).
It then returns these values.
3. Getting Ichimoku Values for Multiple Timeframes
The function is called for four different timeframes:
1-minute ("1"), 3-minute ("3"), 5-minute ("5"), and 15-minute ("15").
The results are stored in variables:
t1_tenkan, t1_kijun for 1-minute
t3_tenkan, t3_kijun for 3-minute
t5_tenkan, t5_kijun for 5-minute
t15_tenkan, t15_kijun for 15-minute
4. Trend Color Determination
The function getColor(tenkan, kijun) assigns colors based on Ichimoku trend signals:
Green (color.green) if Tenkan-sen is above Kijun-sen → BUY Signal.
Red (color.red) if Tenkan-sen is below Kijun-sen → SELL Signal.
5. Creating the Table
A table is created in the top-right of the chart.
The table has 2 columns:
First column: Timeframe labels (1m, 3m, 5m, 15m).
Second column: Trend status (BUY or SELL) based on Tenkan-sen and Kijun-sen.
The color of each trend cell is dynamically updated based on getColor():
Green for BUY
Red for SELL
6. Displaying Data in the Table
The table headers are set: "Timeframe" and "Trend".
The trend status for each timeframe is added:
"1m" row → Displays BUY or SELL with color.
"3m" row → Displays BUY or SELL with color.
"5m" row → Displays BUY or SELL with color.
"15m" row → Displays BUY or SELL with color.
Final Output
This script provides an easy-to-read color-coded table showing Ichimoku trend signals across multiple timeframes. It helps traders quickly determine the momentum direction across different short-term periods.