Could not find function or function reference 'ta.ichimoku'
Write a midpoint function and build the lines from it.
Updated 23 October 2026. Runs in your browser; nothing you type is uploaded.
Try a worked example
My script, Pine v6 indicator
TradingView's compiler stops at line 3
Could not find function or function reference 'ta.ichimoku'
Static checks, which read the code as written: Passes static repaint & Pine Script v6 checks. Edit the script and the compiler line goes; the checks below follow your edits.
Critical repaint flags
0
0 caution flags to verify
Bar-close gate
Not found
barstate.isconfirmed or a bar-close alert
Higher-timeframe calls
0
request.security() calls, of a 40 limit
Plots and alerts
1
Plots, of a 64 limit; 0 alerts
Repaint and lookahead
No lookahead leaks, unshifted request.security() calls or realtime-only signal branches found in this snippet.
Pine Script v6 migration checklist
Declares //@version=6, and none of the migration patterns this checker reads were found. TradingView's compiler is the final word.
Want TradingView indicators whose Pine Script v6 source already passes every check?
Every desk in Pine Pro Library ships as readable .pine v6 source with confirmed higher-timeframe requests and barstate.isconfirmed event logging.
What causes it
Pine has no built-in Ichimoku function. Each line is the midpoint of the highest high and lowest low over its period, so it is a few lines to write.
The fix, compiled
Write a midpoint function and build the lines from it; the two spans are drawn ahead of price with offset.
//@version=6
indicator("My script", overlay = true)
[t, k] = ta.ichimoku(9, 26)
plot(t)//@version=6
indicator("My script", overlay = true)
mid(len) => math.avg(ta.highest(high, len), ta.lowest(low, len))
tenkan = mid(9)
kijun = mid(26)
spanA = math.avg(tenkan, kijun)
spanB = mid(52)
plot(tenkan, "Tenkan")
plot(kijun, "Kijun")
plot(spanA, "Span A", offset = 25)
plot(spanB, "Span B", offset = 25)Names Pine cannot find
- Could not find function or function reference 'study'
- Could not find function or function reference 'security'
- Undeclared identifier "diff"
- Undeclared identifier "color.gold"
- Undeclared identifier "color.cyan"
- Could not find function or function reference 'iff'
- Could not find function or function reference 'ta.adx'
- Could not find function or function reference 'ta.sum'
- Could not find function or function reference 'ta.obv'
- Could not find function or function reference 'math.clamp'
- Could not find function or function reference 'dayofyear'
- Could not find function or function reference 'ema'
- Could not find function or function reference 'sma'
- Could not find function or function reference 'input.integer'
- Could not find function or function reference 'ta.kama'
- Could not find function or function reference 'ta.cmf'
- Could not find function or function reference 'ta.plus_di'
- Could not find function or function reference 'ta.slope'
- Could not find function or function reference 'ta.crossabove'
- Could not find function or function reference 'math.tanh'
- Could not find function or function reference 'math.mod'
- Could not find function or function reference 'input.timezone'
Compiled on TradingView 23 October 2026. The checker above reads repaint and v6 migration patterns; TradingView's compiler is the final word on whether a script compiles.
Have your AI fix the next one
- Pine Fixer An AI skill pack for 45 compiler-verified Pine v6 failure classes, with a repaint clinic. $9.99 once.