This indicator spot potential reversal of the market while identifying Accumulation/Distribution zones. It is compatible with any instrument and timeframe, parameters should be adapted at will. Each levels can act like support and resistance.
The blue dots appear when the oscillator is piercing the +200 overbought level of the -200 oversold level.
This indicator is only compatible for Prorealtime version 10.3
//--External parameters
//Smoother=5
//SupResPeriod = 50
//SupResPercentage = 100
//PricePeriod = 16
//ob = 200
//os = -200
nn = Smoother
ys1 = ( high + low + close * 2 ) / 4
rk3 = exponentialaverage[nn](ys1)
rk4 = std[nn](ys1)
rk5 = (ys1 - rk3 ) * 200 / rk4
rk6 = exponentialaverage[nn](rk5)
up = exponentialaverage[nn](rk6)
down = exponentialaverage[nn](up)
if up<down then
Oo = up
else
oO = down
endif
if up<down then
Ll = down
else
Ll = up
endif
Cc = Ll
if up<down then
DRAWCANDLE(Oo,Cc,Oo,Cc)COLOURED(200,0,0)
else
DRAWCANDLE(Oo,Oo,Cc,Cc)COLOURED(0,200,0)
endif
//-------S/R Zones------
Lookback = SupResPeriod
PerCent = SupResPercentage
Pds = PricePeriod
C3 = cci[Pds](close)
Osc = C3
Value1 = Osc
Value2 = highest[Lookback](Value1)
Value3 = lowest[Lookback](Value1)
Value4 = Value2 - Value3
Value5 = Value4 * ( PerCent / 100 )
ResistanceLine = Value3 + Value5
SupportLine = Value2 - Value5
//--Overbought/Oversold/Warning Detail
UPshape = up > 200 and up>down
DOWNshape = down < -200 and up>down
if UPshape then
DRAWTEXT("+",barindex,highest[1](up)+20,Dialog,Bold,20) coloured(102,255,255)
endif
if DOWNshape then
DRAWTEXT("+",barindex,lowest[1](down)-20,Dialog,Bold,20) coloured(102,255,255)
endif
RETURN ResistanceLine COLOURED(0,200,0) STYLE(dottedline,1) as "Resistance line", SupportLine COLOURED(200,0,0) STYLE(dottedline,1) as "Support line"