//@version=5
indicator("Enhanced Trading Checklist", overlay=false, max_lines_count=500,
max_labels_count=500)
// ==================
// Inputs
// ==================
var G_BASIC = "Basic Technical Settings"
smaShortPeriod = input.int(50, "Short SMA Period", group=G_BASIC)
smaLongPeriod = input.int(200, "Long SMA Period", group=G_BASIC)
volumeMAperiod = input.int(50, "Volume MA Period", group=G_BASIC)
var G_MOMENTUM = "Momentum Settings"
rsiPeriod = input.int(14, "RSI Period", group=G_MOMENTUM)
rsiOverbought = input.float(70, "RSI Overbought", group=G_MOMENTUM)
rsiOversold = input.float(30, "RSI Oversold", group=G_MOMENTUM)
macdFast = input.int(12, "MACD Fast Length", group=G_MOMENTUM)
macdSlow = input.int(26, "MACD Slow Length", group=G_MOMENTUM)
macdSignal = input.int(9, "MACD Signal Length", group=G_MOMENTUM)
var G_VOLATILITY = "Volatility Settings"
bbPeriod = input.int(20, "Bollinger Band Period", group=G_VOLATILITY)
bbMult = input.float(2.0, "Bollinger Band StdDev", group=G_VOLATILITY)
atrPeriod = input.int(14, "ATR Period", group=G_VOLATILITY)
// ==================
// Calculations
// ==================
// Moving Averages
smaShort = ta.sma(close, smaShortPeriod)
smaLong = ta.sma(close, smaLongPeriod)
volMA = ta.sma(volume, volumeMAperiod)
// Momentum
rsi = ta.rsi(close, rsiPeriod)
[macdLine, signalLine, _] = ta.macd(close, macdFast, macdSlow, macdSignal)
// Volatility
[bbMiddle, bbUpper, bbLower] = ta.bb(close, bbPeriod, bbMult)
atr = ta.atr(atrPeriod)
// Trend
ema21 = ta.ema(close, 21)
priceAboveEma21 = close > ema21
goldenCross = ta.cross(smaShort, smaLong) and smaShort > smaLong
// ==================
// Condition Checks
// ==================
// Trend Conditions
priceAboveSMA200 = close > smaLong
priceAboveSMA50 = close > smaShort
bullishAlignment = smaShort > smaLong
priceAboveEMA21 = close > ema21
// Volume Conditions
volumeAboveAvg = volume > volMA
volumeIncreasing = volume > volume[1]
// Momentum Conditions
rsiHealthy = rsi > rsiOversold and rsi < rsiOverbought
macdPositive = macdLine > signalLine
rsiUptrend = rsi > 50
// Volatility Conditions
notOverExtended = close < bbUpper
volatilityInRange = atr < ta.sma(atr, 20)
priceAboveBBMiddle = close > bbMiddle
// Calculate total score
score = 0
score := score + (priceAboveSMA200 ? 1 : 0)
score := score + (priceAboveSMA50 ? 1 : 0)
score := score + (bullishAlignment ? 1 : 0)
score := score + (volumeAboveAvg ? 1 : 0)
score := score + (rsiHealthy ? 1 : 0)
score := score + (macdPositive ? 1 : 0)
score := score + (notOverExtended ? 1 : 0)
score := score + (volatilityInRange ? 1 : 0)
score := score + (priceAboveBBMiddle ? 1 : 0)
score := score + (priceAboveEMA21 ? 1 : 0)
maxScore = 10
scorePercentage = (score / maxScore) * 100
// ==================
// Visualization
// ==================
// Color schemes
strongBuy = color.new(#00ff00, 20) // Green
moderateBuy = color.new(#66ff66, 30) // Light Green
neutral = color.new(#ffff00, 40) // Yellow
weakBuy = color.new(#ff9900, 30) // Orange
avoid = color.new(#ff0000, 20) // Red
scoreColor = score >= 9 ? strongBuy :
score >= 7 ? moderateBuy :
score >= 5 ? neutral :
score >= 3 ? weakBuy :
avoid
// Main score visualization
bgcolor(scoreColor)
plot(scorePercentage, "Score %", color=color.white, linewidth=2,
style=plot.style_line)
hline(90, "Excellent", color=color.new(color.green, 50),
linestyle=hline.style_dashed)
hline(70, "Good", color=color.new(color.yellow, 50), linestyle=hline.style_dashed)
hline(50, "Neutral", color=color.new(color.orange, 50),
linestyle=hline.style_dashed)
// Create detailed checklist table
var table checklist = table.new(position.right, 11, 2, border_width=1)
if barstate.islast
// Header
table.cell(checklist, 0, 0, "Technical Checklist", text_color=color.white,
bgcolor=color.new(color.gray, 20))
table.cell(checklist, 1, 0, "Score: " + str.tostring(score) + "/" +
str.tostring(maxScore),
text_color=scoreColor, bgcolor=color.new(color.gray, 20))
// Trend Conditions
table.cell(checklist, 0, 1, "Trend Analysis", text_color=color.white,
bgcolor=color.new(color.blue, 60))
table.cell(checklist, 1, 1,
"Above 200 SMA: " + (priceAboveSMA200 ? "✓" : "✗") + "\n" +
"Above 50 SMA: " + (priceAboveSMA50 ? "✓" : "✗") + "\n" +
"Above 21 EMA: " + (priceAboveEMA21 ? "✓" : "✗") + "\n" +
"Bullish MA Align: " + (bullishAlignment ? "✓" : "✗"),
text_color=color.white)
// Volume Analysis
table.cell(checklist, 0, 2, "Volume Analysis", text_color=color.white,
bgcolor=color.new(color.blue, 60))
table.cell(checklist, 1, 2,
"Above Avg Volume: " + (volumeAboveAvg ? "✓" : "✗") + "\n" +
"Volume Increasing: " + (volumeIncreasing ? "✓" : "✗"),
text_color=color.white)
// Momentum Analysis
table.cell(checklist, 0, 3, "Momentum", text_color=color.white,
bgcolor=color.new(color.blue, 60))
table.cell(checklist, 1, 3,
"RSI Healthy: " + (rsiHealthy ? "✓" : "✗") + "\n" +
"MACD Positive: " + (macdPositive ? "✓" : "✗") + "\n" +
"RSI Uptrend: " + (rsiUptrend ? "✓" : "✗"),
text_color=color.white)
// Volatility Analysis
table.cell(checklist, 0, 4, "Volatility", text_color=color.white,
bgcolor=color.new(color.blue, 60))
table.cell(checklist, 1, 4,
"Not Overextended: " + (notOverExtended ? "✓" : "✗") + "\n" +
"Volatility Normal: " + (volatilityInRange ? "✓" : "✗") + "\n" +
"Above BB Middle: " + (priceAboveBBMiddle ? "✓" : "✗"),
text_color=color.white)
// Alert conditions
alertcondition(score >= 9, "Strong Buy Signal", "All conditions aligned - Score
{{plot('Score %')}}%")
alertcondition(score <= 3, "Warning Signal", "Multiple conditions failed - Score
{{plot('Score %')}}%")