TradingView
jod17
Jul 4, 2018 7:56 PM

Rsi/Cci Overbought Oversold Candles 

GOLD (US$/OZ)TVC

Description

This indicator will allow you to see overbought and oversold areas of the rsi or the cci, you must set yourself the upper and lower band of the rsi (70-30) or cci (100, -100). By default, it's Rsi
I have already posted the same indicator but only with the Rsi, tradingview.com/script/DCm3C7VG-Overbought-Oversold-Candles/ I wanted to posted a more complete that offers the 2.

On the chart, it is the overbought / oversold area of the Cci that is displayed

Release Notes

I have the time to update the code, the latter was falsifying the result, now everything works, to get the overbought / oversold areas of the CCI, you have to tick the box and enter the values of the top and the bottom manually, same for the RSI, by default, the result is that of the RSI

Release Notes

Update to V4
Comments
Aporio
Hi, I need your help. I want to do the same thing but with the cci only. Even with two CCIs of 14 and 20 periods. Is it possible to help me?
Thank you

//@version=3
study(title="Overbought Oversold Candles", shorttitle="Candles", overlay=true)

src = input(close, title="Source"), len = input(14, minval=1, title="Length")

UpperLenght=input(175, minval=1, title="Upper")
LowerLenght=input(-175, minval=-100, title="Lower")

CciB = input(false, title="CCI ?")
//cci
ma = sma(src, len)
cci = (src - ma) / (0.015 * dev(src, len))

//Calcul
A = CciB ? cci :

Palette = A>UpperLenght?red : A<LowerLenght?lime : na
barcolor(Palette)
jod17
@Aporio, If you still need help I'll send you code tonight. Otherwise, take a look at my oberbought / oversold candle script. It's with the RSI but you can easily replace the rsi with a cci
Aporio
@jod17, Hello, yes. I have try it but imposible. I want 2 cci of 14 and 40 periods. when cci 14 cross level 175 or -175 paint or plot candel one color and when cci 40 cross 175 or -175 change other color distinte.
Thank you. I have hope it!!!!
Luis
UpperLenght=input(175, minval=1, title="Upper")
LowerLenght=input(-175, minval=-100, title="Lower")
jod17
IMPORTANT! Until an update is published, I advise you not to use the checkbox, rather use the box of the "Style" tab to choose between the rsi or bcc, otherwise you will have errors! Sorry, I'll publish an update by Sunday
jod17
**CCI
jod17
Done !!!
More