Can someone please assist with adjusting this simple script to INCLUDE & REMOVE the following:
TO INCLUDE: code in the script to change the color of the Candle Bars to my choosing and not the red/greens
TO REMOVE: the bottom portion without effecting the purpose of the indicator as display on the main chart. Do not want to have the bottom portion to be displayed on the Main Chart.
CURRENT SCRIPT:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at
https://mozilla.org/MPL/2.0/
#// © ceyhun
#indicator(title='Choppiness Index and RSI by ceyhun', format=format.price, precision=2, timeframe='')
# converted by sam4Cok@Samer800 - 07/2023
declare lower;
input ChopLength = 14;#, 'Chop Length', minval=1)
input offset = 0;#, 'Offset', minval=-500, maxval=500)
input rsiLength = 14;#, minval=1, title='Rsi Length')
input src = close;#, 'Source')
input BarColor = yes;#(true, 'Barcolor');
def na = Double.NaN;
def last = isNaN(close);
def ci = 100*Lg(Sum(ATR(Length=1),ChopLength)/(Highest(high,ChopLength) - Lowest(low,ChopLength)))/Lg(ChopLength);
def chopchange = if ci > 61.8 then -1 else
if ci < 38.2 then 1 else 0;#? #0000FF : #FFFF00
plot CHOP = ci[offset];#, 'CHOP', color=chopchange, offset=offset, linewidth=2)
CHOP.AssignValueColor(if chopchange>0 then Color.GREEN else
if chopchange<0 then Color.RED else Color.WHITE);
def nRSI = RSI(Price = src, Length = rsiLength);
def rsichange = if nRSI > 61.8 then 1 else
if nRSI < 38.2 then -1 else 0;#? #FF0000 : #8E1599
plot rsi = nRSI;#, 'RSI', color=rsichange, linewidth=2)
rsi.SetLineWeight(2);
rsi.AssignValueColor(if rsichange>0 then Color.CYAN else
if rsichange<0 then Color.MAGENTA else Color.GRAY);
def band1 = if last then na else 70;#, 'Upper Band', color=#00FF00)
def band2 = if last then na else 61.8;#, 'Upper Band', color=#00FF00, linestyle=hline.style_dashed)
def band3 = if last then na else 38.2;#, 'Lower Band', color=#FF0000, linestyle=hline.style_dashed)
def band4 = if last then na else 30;#, 'Lower Band', color=#FF0000)
AddCloud(band1, band2, Color.DARK_GREEN,Color.DARK_GREEN,yes);
AddCloud(band3, band4, Color.DARK_RED,Color.DARK_RED,yes);
def change1 = if nrsi > ci then 1 else
if nrsi < ci then -1 else 0;# #FF0000 : #FFFF00
AssignPriceColor(if !BarColor then Color.CURRENT else
if change1>0 then Color.GREEN else
if change1<0 then Color.RED else color.GRAY);