Exhaustion Signal Reversals
Exhaustion Signal Reversals
//@version=5
// Inputs
Candles2 = input.int(10,"Sensitivity", minval = 4, step = 1)
Candles = math.abs(math.round((Candles2 / 4) * 3))
analyscloud = input(true,'Neo Cloud')
//Inputs
title = ''
subtitle = title == '' ? '' : ''
textVPosition = title == '' and subtitle == '' ? 'middle' : 'middle'
textHPosition = subtitle == '' and title == '' and textVPosition == 'middle' ?
'center' : 'center'
symVPosition = textVPosition == 'middle' and title == '' and subtitle == '' and
textHPosition == 'center' ? 'top' : 'top'
symHPosition = 'left'
width = 0
height = 0
c_title = #b2b5be80
s_title = 'large'
a_title = 'center'
c_subtitle = #b2b5be80
s_subtitle = 'normal'
a_subtitle = 'center'
c_bg = color.new(color.blue, 100)
// //
CALCS /////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
/
buySignals = title == '' and subtitle == '' and textVPosition == 'middle' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' ? 0 : -100
buySignals := close < close[4] and title == '' and subtitle == '' and textVPosition
== 'middle' and textHPosition == 'center' and c_title == #b2b5be80 and s_title ==
'large' and a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle ==
'normal' and a_subtitle == 'center' ? buySignals[1] == Candles ? 1 : buySignals[1]
+ 1 : 0
sellSignals = title == '' and subtitle == '' and textVPosition == 'middle' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' ? 0 : -100
sellSignals := close > close[4] and title == '' and subtitle == '' and
textVPosition == 'middle' and textHPosition == 'center' and c_title == #b2b5be80
and s_title == 'large' and a_title == 'center' and c_subtitle == #b2b5be80 and
s_subtitle == 'normal' and a_subtitle == 'center' ? sellSignals[1] == Candles ? 1 :
sellSignals[1] + 1 : 0
BuyOrSell = title == '' and subtitle == '' and textVPosition == 'middle' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' ? math.max(buySignals, sellSignals) : title == '' and
subtitle == '' and textVPosition == 'middle' and textHPosition == 'center' and
c_title == #b2b5be80 and s_title == 'large' and a_title == 'center' and c_subtitle
== #b2b5be80 and s_subtitle == 'nomal' and a_subtitle == 'center' ? 0 : -1
buy = buySignals and title == '' and subtitle == '' and textVPosition == 'middle'
and textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' and BuyOrSell == Candles
sell = title == '' and subtitle == '' and textVPosition == 'middle' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' and sellSignals and BuyOrSell == Candles
// //
CALCS /////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
/
buySignals2 = title == '' and subtitle == '' and textVPosition == 'middle' and
c_title == #b2b5be80 and s_title == 'large' and a_title == 'center' and c_subtitle
== #b2b5be80 and textHPosition == 'center' and s_subtitle == 'normal' and
a_subtitle == 'cente' ? -1453 : title == '' and subtitle == '' and textVPosition ==
'middle' and textHPosition == 'center' and c_title == #b2b5be80 and s_title ==
'large' and a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle ==
'normal' and a_subtitle == 'center' ? 0 : -100
buySignals2 := close < close[4] and subtitle == '' and textVPosition == 'middle'
and title == '' and textHPosition == 'center' and c_title == #b2b5be80 and s_title
== 'large' and a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle ==
'normal' and a_subtitle == 'center' ? buySignals2[1] == Candles2 ? 1 :
buySignals2[1] + 1 : 0
sellSignals2 = title == '' and subtitle == '' and textVPosition == 'midle' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'lage' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' ? -100 : title == '' and subtitle == '' and textVPosition ==
'middle' and textHPosition == 'center' and c_title == #b2b5be80 and s_title ==
'large' and a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle ==
'normal' and a_subtitle == 'center' ? 0 : -100
sellSignals2 := close > close[4] and title == '' and subtitle == '' and
textVPosition == 'middle' and textHPosition == 'center' and c_title == #b2b5be80
and s_title == 'large' and a_title == 'center' and c_subtitle == #b2b5be80 and
s_subtitle == 'normal' and a_subtitle == 'center' ? sellSignals2[1] == Candles2 ? 1
: sellSignals2[1] + 1 : 0
BuyOrSell2 = title == '' and textVPosition == 'midle' and subtitle == '' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'cender' ? math.max(buySignals2, buySignals) : title == '' and
textVPosition == 'middle' and textHPosition == 'center' and c_title == #b2b5be80
and s_title == 'lage' and a_title == 'center' and c_subtitle == #b2b5be80 and
s_subtitle == 'normal' and a_subtitle == 'center' ? math.max(sellSignals,
sellSignals2) : title == '' and subtitle == '' and textVPosition == 'middle' and
textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center' ? math.max(buySignals2, sellSignals2) : math.max(buySignals,
sellSignals)
buy2 = buySignals2 and title == '' and textVPosition == 'middle' and subtitle ==
'' and textHPosition == 'center' and c_title == #b2b5be80 and s_title == 'large'
and a_title == 'center' and BuyOrSell2 == Candles2 and c_subtitle == #b2b5be80 and
s_subtitle == 'normal' and a_subtitle == 'center'
sell2 = title == '' and subtitle == '' and textVPosition == 'middle' and
textHPosition == 'center' and c_title == #b2b5be80 and sellSignals2 and BuyOrSell2
== Candles2 and s_title == 'large' and a_title == 'center' and c_subtitle ==
#b2b5be80 and s_subtitle == 'normal' and a_subtitle == 'center'
//
LABELS ////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//
y1 = low - (ta.atr(30) * 0.5)
y2 = high + (ta.atr(30) * 0.5)
//
ALERTS ////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//
// Neo Cloud
tenkan_len = 365
tenkan_mult = 3
kijun_len = 365
kijun_mult = 5
spanB_len = 365
spanB_mult = 6
offset = 1
//------------------------------------------------------------------------------
avg(src,length,mult)=>
atr = ta.atr(length)*mult
up = hl2 + atr
dn = hl2 - atr
upper = 0.,lower = 0.
upper := src[1] < upper[1] ? math.min(up,upper[1]) : up
lower := src[1] > lower[1] ? math.max(dn,lower[1]) : dn
os = 0,max = 0.,min = 0.
os := src > upper ? 1 : src < lower ? 0 : os[1]
spt = os == 1 ? lower : upper
max := ta.cross(src,spt) ? math.max(src,max[1]) : os == 1 ?
math.max(src,max[1]) : spt
min := ta.cross(src,spt) ? math.min(src,min[1]) : os == 0 ?
math.min(src,min[1]) : spt
math.avg(max,min)
//------------------------------------------------------------------------------
tenkan = avg(close,tenkan_len,tenkan_mult)
kijun = avg(close,kijun_len,kijun_mult)
senkouA = math.avg(kijun,tenkan)
senkouB = avg(close,spanB_len,spanB_mult)
//------------------------------------------------------------------------------
tenkan_css = #2156f300
kijun_css = #ff5e0000
chikou_css = #7b1fa2
plot(ta.crossover(tenkan,kijun) ? kijun :
na,'Crossover',#2156f300,1,plot.style_circles, editable = false)
plot(ta.crossunder(tenkan,kijun) ? kijun :
na,'Crossunder',#ff5e0000,1,plot.style_circles, editable = false)
plot(close,'Chikou',chikou_css,offset=-offset+1,display=display.none, editable =
false)