OPEN-SOURCE SCRIPT

Futures Momentum Scanner – jyoti

71
//version=5
indicator("Futures Momentum Scanner – Avvu Edition", overlay=false, max_lines_count=500)

//------------------------------
// USER INPUTS
//------------------------------
rsiLen = input.int(14, "RSI Length")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
stLength = input.int(10, "Supertrend Length")
stMult = input.float(3.0, "Supertrend Multiplier")

//------------------------------
// SUPER TREND
//------------------------------
[supertrend, stDirection] = ta.supertrend(stMult, stLength)
trendUp = stDirection == 1

//------------------------------
// RSI
//------------------------------
rsi = ta.rsi(close, rsiLen)
rsiBull = rsi > 50 and rsi < 65

//------------------------------
// MACD
//------------------------------
[macd, signal, hist] = ta.macd(close, macdFast, macdSlow, macdSignal)
macdBull = macd > signal and macd > 0

//------------------------------
// MOVING AVERAGE TREND
//------------------------------
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)

trendStack = ema20 > ema50 and ema50 > ema200

//------------------------------
// BREAKOUT LOGIC
//------------------------------
prevHigh = ta.highest(high, 20)
breakout = close > prevHigh

//------------------------------
// FINAL SCANNER LOGIC
//------------------------------
bullishCandidate = trendUp and rsiBull and macdBull and trendStack and breakout

//------------------------------
// TABLE OUTPUT FOR SCANNER FEEL
//------------------------------
var table t = table.new(position.top_right, 1, 1)

if barstate.islast
msg = bullishCandidate ? "✔ BUY Candidate" : "– Not a Setup"
table.cell(t, 0, 0, msg, bgcolor=bullishCandidate ? color.new(color.green, 0) : color.new(color.red, 70))

//------------------------------
// ALERT
//------------------------------
alertcondition(bullishCandidate, title="Scanner Trigger", message="This stock meets Avvu's futures scanner criteria!")

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.