Instead of stacking indicator after indicator and trying to read them all at once, this puts your rules in one checklist on the chart. Each rule turns green or red on every bar, and the bottom line only says ALL GREEN, GO when every rule passes.
Heads up: the five rules are examples for a long setup, not a strategy. Swap in your own rules, then test them before you trade them.
How to add it
In TradingView, open the Pine Editor and create a new indicator.
Tap Copy code below, replace everything in the editor with it, then click Save and Add to chart.
Open the indicator's Settings → Inputs to switch rules on or off and change their numbers.
Trade Checklist (Pine Script v6)
//@version=6
indicator("Trade Checklist by TC Trading", shorttitle = "Trade Checklist", overlay = true)
// A long-setup checklist that only turns green when every rule passes.
// Every rule has an on/off switch and its own numbers in Settings > Inputs.
// To add your own rule: add an input and a true/false condition (sections 1-2),
// then add it to the lists in section 3. The table, count, marker and alert follow.
// ───────────── 1. Inputs ─────────────
G1 = "Rule 1: trend"
r1On = input.bool(true, "Close above its SMA", group = G1)
smaLen = input.int(200, "SMA length (chart timeframe)", minval = 1, group = G1)
G2 = "Rule 2: EMA stack"
r2On = input.bool(true, "Fast EMA above slow EMA", group = G2)
fastLen = input.int(20, "Fast EMA length", minval = 1, group = G2)
slowLen = input.int(50, "Slow EMA length", minval = 1, group = G2)
G3 = "Rule 3: RSI zone"
r3On = input.bool(true, "RSI inside the zone", group = G3)
rsiLen = input.int(14, "RSI length", minval = 1, group = G3)
rsiLo = input.float(40, "Zone from", group = G3)
rsiHi = input.float(70, "Zone to", group = G3)
G4 = "Rule 4: volume"
r4On = input.bool(true, "Volume above its average", group = G4)
volLen = input.int(20, "Average of the last N bars", minval = 1, group = G4)
volMult = input.float(1.0, "Times the average", minval = 0.0, step = 0.1, group = G4)
G5 = "Rule 5: not stretched"
r5On = input.bool(true, "Close within N ATR of the EMA", group = G5)
strLen = input.int(20, "EMA length", minval = 1, group = G5)
atrLen = input.int(14, "ATR length", minval = 1, group = G5)
atrMax = input.float(2.0, "Max ATRs away", minval = 0.0, step = 0.25, group = G5)
GD = "Display"
textPt = input.int(20, "Text size", minval = 8, maxval = 60, group = GD, tooltip = "20 = TradingView's 'large'. The bottom row is 40% bigger.")
posIn = input.string("Top right", "Table position", options = ["Top right", "Top left", "Bottom right", "Bottom left"], group = GD)
showMarks = input.bool(true, "Marker on all-green bars", group = GD)
firstOnly = input.bool(false, "Marker only on the first bar of a green run", group = GD)
showMAs = input.bool(true, "Show the moving averages", group = GD)
passCol = input.color(#089981, "Colors: pass, fail, GO, WAIT", group = GD, inline = "col")
failCol = input.color(#F23645, "", group = GD, inline = "col")
goCol = input.color(#00C853, "", group = GD, inline = "col")
waitCol = input.color(#434651, "", group = GD, inline = "col")
// ───────────── 2. The rules (true = pass) ─────────────
smaVal = ta.sma(close, smaLen)
emaFast = ta.ema(close, fastLen)
emaSlow = ta.ema(close, slowLen)
rsiVal = ta.rsi(close, rsiLen)
volAvg = ta.sma(volume, volLen)
emaStr = ta.ema(close, strLen)
atrVal = ta.atr(atrLen)
pass1 = close > smaVal
pass2 = emaFast > emaSlow
pass3 = rsiVal >= rsiLo and rsiVal <= rsiHi
pass4 = volume > volAvg * volMult
pass5 = math.abs(close - emaStr) <= atrMax * atrVal
// ───────────── 3. The checklist (one entry per rule, same order in every list) ─────────────
ruleOn = array.from(r1On, r2On, r3On, r4On, r5On)
rulePass = array.from(pass1, pass2, pass3, pass4, pass5)
int rulesOn = 0
int rulesPassing = 0
for [i, isOn] in ruleOn
if isOn
rulesOn += 1
if rulePass.get(i)
rulesPassing += 1
allGreen = rulesOn > 0 and rulesPassing == rulesOn
// ───────────── 4. Helpers ─────────────
tfText() =>
int m = timeframe.multiplier
string out = timeframe.period
if timeframe.isseconds
out := str.tostring(m) + "s"
else if timeframe.isminutes
out := m % 60 == 0 ? str.tostring(int(m / 60)) + "H" : str.tostring(m) + "m"
else if timeframe.isdaily
out := str.tostring(m) + "D"
else if timeframe.isweekly
out := str.tostring(m) + "W"
else if timeframe.ismonthly
out := str.tostring(m) + "M"
out
num(float x, string f, string suffix) =>
na(x) ? "n/a" : str.tostring(x, f) + suffix
signed(float x, string suffix) =>
na(x) ? "n/a" : (x >= 0 ? "+" : "") + str.tostring(x, "0.0") + suffix
tablePos(string s) =>
switch s
"Top left" => position.top_left
"Bottom right" => position.bottom_right
"Bottom left" => position.bottom_left
=> position.top_right
// ───────────── 5. The table ─────────────
var table board = table.new(tablePos(posIn), 3, ruleOn.size() + 2, border_color = chart.bg_color, border_width = 2)
if barstate.isfirst
board.merge_cells(0, 0, 2, 0)
board.merge_cells(0, rulesOn + 1, 2, rulesOn + 1)
if barstate.islast
ruleName = array.from(
"Close > " + str.tostring(smaLen) + " SMA (" + tfText() + ")",
str.tostring(fastLen) + " EMA > " + str.tostring(slowLen) + " EMA",
"RSI " + str.tostring(rsiLen) + " in " + str.tostring(rsiLo) + "-" + str.tostring(rsiHi),
"Volume > " + (volMult == 1 ? "" : str.tostring(volMult) + "x ") + str.tostring(volLen) + "-bar avg",
"Within " + str.tostring(atrMax) + " ATR of " + str.tostring(strLen) + " EMA")
ruleValue = array.from(
signed((close / smaVal - 1) * 100, "%"),
signed((emaFast / emaSlow - 1) * 100, "%"),
num(rsiVal, "0.0", ""),
num(volume / volAvg, "0.00", "x"),
signed((close - emaStr) / atrVal, " ATR"))
board.cell(0, 0, "TRADE CHECKLIST · LONG", text_color = color.white, bgcolor = #2A2E39, text_size = textPt, text_formatting = text.format_bold)
int row = 1
for [i, isOn] in ruleOn
if isOn
ok = rulePass.get(i)
bg = ok ? passCol : failCol
board.cell(0, row, ok ? "✔" : "✖", text_color = color.white, bgcolor = bg, text_size = textPt)
board.cell(1, row, ruleName.get(i), text_color = color.white, bgcolor = bg, text_size = textPt, text_halign = text.align_left)
board.cell(2, row, ruleValue.get(i), text_color = color.white, bgcolor = bg, text_size = textPt, text_halign = text.align_right)
row += 1
verdict = rulesOn == 0 ? "TURN A RULE ON" : allGreen ? "ALL GREEN, GO" : "WAIT (" + str.tostring(rulesPassing) + " of " + str.tostring(rulesOn) + ")"
board.cell(0, row, verdict, text_color = allGreen ? color.black : color.white, bgcolor = allGreen ? goCol : waitCol, text_size = math.round(textPt * 1.4), text_formatting = text.format_bold)
// ───────────── 6. Plots ─────────────
// Data values first: hidden on the chart, shown in the Data Window and usable as Pine Screener columns/filters.
plot(allGreen ? 1 : 0, "All green (1 = yes)", display = display.data_window + display.pine_screener)
plot(rulesPassing, "Rules passing", display = display.data_window + display.pine_screener)
plot(pass1 ? 1 : 0, "R1 trend", display = display.data_window + display.pine_screener)
plot(pass2 ? 1 : 0, "R2 EMA stack", display = display.data_window + display.pine_screener)
plot(pass3 ? 1 : 0, "R3 RSI zone", display = display.data_window + display.pine_screener)
plot(pass4 ? 1 : 0, "R4 volume", display = display.data_window + display.pine_screener)
plot(pass5 ? 1 : 0, "R5 not stretched", display = display.data_window + display.pine_screener)
// Chart visuals.
plot(showMAs and r1On ? smaVal : na, "SMA", color = color.gray, linewidth = 2)
plot(showMAs and (r2On or (r5On and strLen == fastLen)) ? emaFast : na, "Fast EMA", color = #2962FF)
plot(showMAs and r2On ? emaSlow : na, "Slow EMA", color = #FF9800)
plot(showMAs and r5On and strLen != fastLen ? emaStr : na, "Stretch EMA", color = #AB47BC)
markBar = showMarks and allGreen and (not firstOnly or not allGreen[1])
plotshape(markBar, "All-green marker", style = shape.triangleup, location = location.belowbar, color = goCol, size = size.tiny)
alertcondition(allGreen and not allGreen[1], "Checklist turned ALL GREEN", "{{ticker}} ({{interval}}): every checklist rule passes")
What it checks
Trend: the close is above the 200 SMA of the chart's timeframe.
EMA stack: the 20 EMA is above the 50 EMA.
Momentum zone: RSI(14) is between 40 and 70.
Volume: volume is above its 20-bar average.
Not stretched: the close is within 2 ATR of the 20 EMA.
Every rule has its own on/off switch and numbers. Turn one off and the count changes to "of 4". A small green triangle marks every past bar where everything passed, so you can see how often your setup really shows up.
Get an alert when it turns green
Create an alert on the chart and pick the condition Checklist turned ALL GREEN. It triggers on the bar where every rule that's switched on passes after at least one didn't.
Scan a whole watchlist
On TradingView's paid plans, the Pine Screener can run this checklist across a watchlist. Pick the indicator, filter All green (1 = yes) to 1, and scan. You get only the charts where every rule passes right now.
Want more free tools like this?
I share trading tools, scripts and walkthroughs on Instagram at @tctradinglab and on YouTube at TC Trading.
Don't have TradingView yet? Get it here. That's an affiliate link, so I may earn a commission at no extra cost to you.
Not financial advice. A backtest shows how rules would have done, not how they will do. Test anything before you trade it with real money.