indicator('ULTIMATE-12IN1 (BY KHO_OLIO)-2023', shorttitle='12IN1 FRAME BY KHOOLIO-2023', overlay=false, timeframe="", timeframe_gaps=true)
// Check for higher highs and lower lows
//BANDS strength
normal1 = ta.ema(high, 4)
normal2 = ta.ema(low, 4)
normal3 = ta.ema(high, 7)
normal4 = ta.ema(low, 7)
normal5 = ta.wma(high, 4)
normal6 = ta.wma(low, 4)
normal7 = ta.wma(high, 7)
normal8 = ta.wma(low, 7)
up1 = normal1 > normal3 and normal2 > normal4
down1 = normal2 < normal4 and normal1 < normal3
up2 = normal5 > normal7 and normal6 > normal8
down2 = normal6 < normal8 and normal5 < normal7
bandupi = up1 and up2 and normal1 > normal1[1] and normal3 > normal3[1] and normal2 > normal2[1] and normal4 > normal4[1] and normal5 > normal5[1] and normal7 > normal7[1] and normal6 > normal6[1] and normal8 > normal8[1]
banddowni = down1 and down2 and normal2 < normal2[1] and normal4 < normal4[1] and normal1 < normal1[1] and normal3 < normal3[1] and normal6 < normal6[1] and normal8 < normal8[1] and normal5 < normal5[1] and normal7 < normal7[1]
//MACD strength
fast = ta.ema(close, 50)
slow = ta.ema(close, 64)
MACD = fast - slow
signal = ta.ema(MACD, 47)
hist = MACD - signal
macdupi = MACD > signal and hist > hist[1] or MACD < signal and hist > hist[1]
macddowni = MACD < signal and hist < hist[1] or MACD > signal and hist < hist[1]
//PARABOLICSAR strength
out = ta.sar(0.02, 0.022, 0.2)
sarupi = close > out and out > out[1]
sardowni = close < out and out < out[1]
//Indicator strength&alert
x = 1
y = -1
z = 0
bandupn = bandupi ? x : z
banddownn = banddowni ? y : z
macdupn = macdupi ? x : z
macddownn = macddowni ? y : z
sarupn = sarupi ? x : z
sardownn = sardowni ? y : z
rsiupn = rsiupi ? x : z
rsidownn = rsidowni ? y : z
stochupn = stochupi ? x : z
stochdownn = stochdowni ? y : z
cciupn = cciupi ? x : z
ccidownn = ccidowni ? y : z
adxupn = adxupi ? x : z
adxdownn = adxdowni ? y : z
atrupn = atrup ? x : z
atrdownn = atrdown ? y : z
tdupn = tdupi ? x : z
tddownn = tddowni ? y : z
tbupn = tbupi ? x : z
tbdownn = tbdowni ? y : z
vaupn = vaupi ? x : z
vadownn = vadowni ? y : z
bbupn = bbupi ? x : z
bbdownn = bbdowni ? y : z
a = bandupn == 0 and banddownn == 0
b = macdupn == 0 and macddownn == 0
c = sarupn == 0 and sardownn == 0
d = rsiupn == 0 and rsidownn == 0
e = stochupn == 0 and stochdownn == 0
f = cciupn == 0 and ccidownn == 0
g = adxupn == 0 and adxdownn == 0
h = atrupn == 0 and atrdownn == 0
i = tdupn == 0 and tddownn == 0
j = tbupn == 0 and tbdownn == 0
k = vaupn == 0 and vadownn == 0
m = bbupn == 0 and bbdownn == 0
bandn = a ? x : z
macdn = b ? x : z
sarn = c ? x : z
rsin = d ? x : z
stochn = e ? x : z
ccin = f ? x : z
adxn = g ? x : z
atrn = h ? x : z
tdn = i ? x : z
tbn = j ? x : z
van = k ? x : z
bbn = m ? x : z
// This code is an indicator script for TradingView designed to show market sentiment based on 12 different indicators.
// The idea was created by ALKHO_OLY on April 7, 2022.
// This version is created for the year 2023.
// BANDS strength
normal1 = ta.ema(high, 4)
normal2 = ta.ema(low, 4)
normal3 = ta.ema(high, 7)
normal4 = ta.ema(low, 7)
normal5 = ta.wma(high, 4)
normal6 = ta.wma(low, 4)
normal7 = ta.wma(high, 7)
normal8 = ta.wma(low, 7)
up1 = normal1 > normal3 and normal2 > normal4
down1 = normal2 < normal4 and normal1 < normal3
up2 = normal5 > normal7 and normal6 > normal8
down2 = normal6 < normal8 and normal5 < normal7
bandupi = up1 and up2 and normal1 > normal1[1] and normal3 > normal3[1] and normal2 > normal2[1] and normal4 > normal4[1] and normal5 > normal5[1] and normal7 > normal7[1] and normal6 > normal6[1] and normal8 > normal8[1]
banddowni = down1 and down2 and normal2 < normal2[1] and normal4 < normal4[1] and normal1 < normal1[1] and normal3 < normal3[1] and normal6 < normal6[1] and normal8 < normal8[1] and normal5 < normal5[1] and normal7 < normal7[1]
// MACD strength
fast = ta.ema(close, 50)
slow = ta.ema(close, 64)
MACD = fast - slow
signal = ta.ema(MACD, 47)
hist = MACD - signal
macdupi = MACD > signal and hist > hist[1] or MACD < signal and hist > hist[1]
macddowni = MACD < signal and hist < hist[1] or MACD > signal and hist < hist[1]
// PARABOLICSAR strength
out = ta.sar(0.02, 0.022, 0.2)
sarupi = close > out and out > out[1]
sardowni = close < out and out < out[1]