0% found this document useful (0 votes)
37 views

Exhaustion Signal Reversals

Uploaded by

ser77.ru77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Exhaustion Signal Reversals

Uploaded by

ser77.ru77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

// This code is created by algopoint.

//@version=5

indicator(title='Exhaustion Signal | Reversals', shorttitle='Exhaustion Signal |


Reversals', overlay=true)

// 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)

textstylist = table.new(textVPosition + '_' + textHPosition, 1, 3)

// //
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)

plotshape(buy2 and title == '' and textVPosition == 'middle' and textHPosition ==


'center' and c_title == #b2b5be80 and s_title == 'large' and subtitle == '' and
a_title == 'center' and c_subtitle == #b2b5be80 and s_subtitle == 'normal' and
a_subtitle == 'center', style=shape.labelup, color=color.new(#018208, 0),text =
'▲+', textcolor=color.new(color.white, 0), size=size.small,
location=location.belowbar)
plotshape(sell2 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', style=shape.labeldown, color=color.new(#d12208, 0),text =
'▼+', textcolor=color.new(color.white, 0), size=size.small,
location=location.abovebar)
plotshape(buy 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', style=shape.xcross, color=#ffffff00,text = '▲',
textcolor=color.new(#018208, 0), size=size.tiny, location= location.belowbar)
plotshape(sell 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', style=shape.xcross, color=#ffffff00,text = '▼',
textcolor=color.new(#d12208, 0), size=size.tiny, location=location.abovebar)

//
ALERTS ////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
//

alertcondition(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 buy2, 'Buy', 'Buy') // Once per bar close
alertcondition(sell2 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', 'Sell', 'Sell') // Once per bar close
alertcondition(buy 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', 'Buy', 'Buy') // Once per bar close
alertcondition(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 sell, 'Sell', 'Sell') // Once per bar close

// 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

cloud_a = color.new(#089981, 80)


cloud_b = color.new(#f23645, 80)

chikou_css = #7b1fa2

//plot(tenkan,'Tenkan-Sen',tenkan_css, editable = false)


//plot(kijun,'Kijun-Sen',kijun_css, editable = false)

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)

A = plot(senkouA,'Senkou Span A',na,offset=offset-1, editable = false)


B = plot(senkouB,'Senkou Span B',na,offset=offset-1, editable = false)
fill(A,B,senkouA > senkouB and analyscloud == true ? cloud_a : analyscloud ==
true ? cloud_b : na)

plot(close,'Chikou',chikou_css,offset=-offset+1,display=display.none, editable =
false)

You might also like