OPEN-SOURCE SCRIPT

DT-FNO Screener

46
//version=5
indicator("DT-FNO Screener", overlay=true)

// === INPUTS ===
lengthEMA1 = 20
lengthEMA2 = 50
lengthEMA3 = 200
lengthEMA4 = 10
rsiLength = 14

// === PRICE DATA ===
closePrice = close
highPrev = high[1]
lowPrev = low[1]
openToday = open
closeToday = close

// === EMA CALCULATIONS ===
ema20D = ta.ema(close, 20)
ema50D = ta.ema(close, 50)
ema200D = ta.ema(close, 200)
ema10D = ta.ema(close, 10)
ema20W = ta.ema(request.security(syminfo.tickerid, "W", close), 20)
ema50W = ta.ema(request.security(syminfo.tickerid, "W", close), 50)

// === RSI ===
rsiVal = ta.rsi(close, rsiLength)

// === % CHANGE STATS ===
percentChange = 100 * (close - close[1]) / close
min7Change = ta.lowest(percentChange, 7)
max5Change = ta.highest(percentChange, 5)

// === CONDITIONS (from screener) ===

// Futures Segment
cond1 = ema20W < ema50W
cond2 = ema20D < ema50D
cond3 = ema50D < ema200D
cond4 = close > ema20D

// Cash Segment
cond5 = closeToday < highPrev
cond6 = closeToday > lowPrev
cond7 = openToday > lowPrev
cond8 = openToday < highPrev
cond9 = ((ema10D - close) / close) <= 0.02
cond10 = rsiVal <= 60

// % Change Conditions
cond11 = min7Change <= -1.5
cond12 = max5Change <= 1.2

// === FINAL COMBINED CONDITION ===
all_conditions = cond1 and cond2 and cond3 and cond4 and cond5 and cond6 and cond7 and cond8 and cond9 and cond10 and cond11 and cond12

// === PLOT SIGNAL ===
bgcolor(all_conditions ? color.new(color.green, 80) : na)
plotshape(all_conditions, title="DT-FNO Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="DT")

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.