Code Library / Ichimoku

Pine Script Ichimoku Scanner

Multi-TF Ichimoku scanner in a dashboard table.

Language: Pine Script · Category: Ichimoku · Tags: Ichimoku, scanner, multi-timeframe, Pine Script, dashboard

Source code

//@version=5
indicator("Ichi Scanner",overlay=true)
is(tf)=>
    t=request.security(syminfo.tickerid,tf,(ta.highest(high,9)+ta.lowest(low,9))/2)
    k=request.security(syminfo.tickerid,tf,(ta.highest(high,26)+ta.lowest(low,26))/2)
    c=request.security(syminfo.tickerid,tf,close)
    c>t and t>k?1:c<k?-1:0
var table tb=table.new(position.top_right,2,4)
table.cell(tb,0,0,"TF"); table.cell(tb,1,0,"Signal")
s1=is("15"); s2=is("60"); s3=is("D")
table.cell(tb,0,1,"15m"); table.cell(tb,1,1,s1>0?"BUY":"SELL",text_color=s1>0?color.green:color.red)
table.cell(tb,0,2,"1H"); table.cell(tb,1,2,s2>0?"BUY":"SELL",text_color=s2>0?color.green:color.red)
table.cell(tb,0,3,"D"); table.cell(tb,1,3,s3>0?"BUY":"SELL",text_color=s3>0?color.green:color.red)

How to use this snippet

This is a building block, not a finished trading system. Paste it into your own Pine Script project, compile it, and test it on a demo account with your broker's real spreads before relying on it. You can convert it to MQL4 or MQL5 with the Pine Script converter.

Related snippets