it is just smooth sensitive indicators colors candles based on the level of the study. Multiple studies included.
CODE:
CSS:
#// © peacefulLizard50262
# based on indicator("RSI Color") by © peacefulLizard50262
# Created by Sam4Cok@Samer800 - 12/2022
declare lower;
input BarColor = yes;
input src = close;
input length = 10;
input oscType = {default RSI, TMO, StochRSI, MFI, UltimateOsc, TSI, IntradayMomIndex};
input overBought = 75;
input overSold = 25;
def na = Double.NaN;
def c = close;
#--- Colors
DefineGlobalColor("0" , CreateColor(21, 0, 255));
DefineGlobalColor("1" , CreateColor(23, 9, 246));
DefineGlobalColor("2" , CreateColor(25, 18, 237));
DefineGlobalColor("3" , CreateColor(27, 26, 229));
DefineGlobalColor("4" , CreateColor(29, 35, 220));
DefineGlobalColor("5" , CreateColor(31, 44, 211));
DefineGlobalColor("6" , CreateColor(33, 53, 202));
DefineGlobalColor("7" , CreateColor(35, 62, 193));
DefineGlobalColor("8" , CreateColor(36, 70, 185));
DefineGlobalColor("9" , CreateColor(38, 79, 176));
DefineGlobalColor("10" , CreateColor(40, 88, 167));
DefineGlobalColor("11" , CreateColor(42, 97, 158));
DefineGlobalColor("12" , CreateColor(44, 106, 149));
DefineGlobalColor("13" , CreateColor(46, 114, 141));
DefineGlobalColor("14" , CreateColor(48, 123, 132));
DefineGlobalColor("15" , CreateColor(50, 132, 123));
DefineGlobalColor("16" , CreateColor(52, 141, 114));
DefineGlobalColor("17" , CreateColor(54, 149, 106));
DefineGlobalColor("18" , CreateColor(56, 158, 97));
DefineGlobalColor("19" , CreateColor(58, 167, 88));
DefineGlobalColor("20" , CreateColor(60, 176, 79));
DefineGlobalColor("21" , CreateColor(62, 185, 70));
DefineGlobalColor("22" , CreateColor(63, 193, 62));
DefineGlobalColor("23" , CreateColor(65, 202, 53));
DefineGlobalColor("24" , CreateColor(67, 211, 44));
DefineGlobalColor("25" , CreateColor(69, 220, 35));
DefineGlobalColor("26" , CreateColor(71, 229, 26));
DefineGlobalColor("27" , CreateColor(73, 237, 18));
DefineGlobalColor("28" , CreateColor(75, 246, 9));
DefineGlobalColor("29" , CreateColor(77, 255, 0));
DefineGlobalColor("30" , CreateColor(83, 255, 0));
DefineGlobalColor("31" , CreateColor(89, 255, 0));
DefineGlobalColor("32" , CreateColor(95, 254, 0));
DefineGlobalColor("33" , CreateColor(101, 254, 0));
DefineGlobalColor("34" , CreateColor(107, 254, 0));
DefineGlobalColor("35" , CreateColor(113, 254, 0));
DefineGlobalColor("36" , CreateColor(119, 253, 0));
DefineGlobalColor("37" , CreateColor(125, 253, 0));
DefineGlobalColor("38" , CreateColor(130, 253, 0));
DefineGlobalColor("39" , CreateColor(136, 253, 0));
DefineGlobalColor("40" , CreateColor(142, 252, 0));
DefineGlobalColor("41" , CreateColor(148, 252, 0));
DefineGlobalColor("42" , CreateColor(154, 252, 0));
DefineGlobalColor("43" , CreateColor(160, 251, 0));
DefineGlobalColor("44" , CreateColor(166, 251, 0));
DefineGlobalColor("45" , CreateColor(172, 251, 0));
DefineGlobalColor("46" , CreateColor(178, 251, 0));
DefineGlobalColor("47" , CreateColor(184, 250, 0));
DefineGlobalColor("48" , CreateColor(190, 250, 0));
DefineGlobalColor("49" , CreateColor(196, 250, 0));
DefineGlobalColor("50" , CreateColor(202, 249, 0));
DefineGlobalColor("51" , CreateColor(208, 249, 0));
DefineGlobalColor("39" , CreateColor(136, 253, 0));
DefineGlobalColor("40" , CreateColor(142, 252, 0));
DefineGlobalColor("41" , CreateColor(148, 252, 0));
DefineGlobalColor("42" , CreateColor(154, 252, 0));
DefineGlobalColor("43" , CreateColor(160, 251, 0));
DefineGlobalColor("44" , CreateColor(166, 251, 0));
DefineGlobalColor("45" , CreateColor(172, 251, 0));
DefineGlobalColor("46" , CreateColor(178, 251, 0));
DefineGlobalColor("47" , CreateColor(184, 250, 0));
DefineGlobalColor("48" , CreateColor(190, 250, 0));
DefineGlobalColor("49" , CreateColor(196, 250, 0));
DefineGlobalColor("50" , CreateColor(202, 249, 0));
DefineGlobalColor("51" , CreateColor(208, 249, 0));
DefineGlobalColor("52" , CreateColor(213, 249, 0));
DefineGlobalColor("53" , CreateColor(219, 249, 0));
DefineGlobalColor("54" , CreateColor(225, 248, 0));
DefineGlobalColor("55" , CreateColor(231, 248, 0));
DefineGlobalColor("56" , CreateColor(237, 248, 0));
DefineGlobalColor("57" , CreateColor(243, 248, 0));
DefineGlobalColor("58" , CreateColor(249, 247, 0));
DefineGlobalColor("59" , CreateColor(255, 247, 0));
DefineGlobalColor("60" , CreateColor(255, 238, 0));
DefineGlobalColor("61" , CreateColor(255, 230, 0));
DefineGlobalColor("62" , CreateColor(255, 222, 0));
DefineGlobalColor("63" , CreateColor(255, 213, 0));
DefineGlobalColor("64" , CreateColor(255, 205, 0));
DefineGlobalColor("65" , CreateColor(255, 197, 0));
DefineGlobalColor("66" , CreateColor(255, 189, 0));
DefineGlobalColor("67" , CreateColor(255, 181, 0));
DefineGlobalColor("68" , CreateColor(255, 172, 0));
DefineGlobalColor("69" , CreateColor(255, 164, 0));
DefineGlobalColor("70" , CreateColor(255, 156, 0));
DefineGlobalColor("71" , CreateColor(255, 148, 0));
DefineGlobalColor("72" , CreateColor(255, 140, 0));
DefineGlobalColor("73" , CreateColor(255, 131, 0));
DefineGlobalColor("74" , CreateColor(255, 123, 0));
DefineGlobalColor("75" , CreateColor(255, 115, 0));
DefineGlobalColor("76" , CreateColor(255, 107, 0));
DefineGlobalColor("77" , CreateColor(255, 98, 0));
DefineGlobalColor("78" , CreateColor(255, 90, 0));
DefineGlobalColor("79" , CreateColor(255, 82, 0));
DefineGlobalColor("80" , CreateColor(255, 74, 0));
DefineGlobalColor("81" , CreateColor(255, 66, 0));
DefineGlobalColor("82" , CreateColor(255, 57, 0));
DefineGlobalColor("83" , CreateColor(255, 49, 0));
DefineGlobalColor("84" , CreateColor(255, 41, 0));
DefineGlobalColor("85" , CreateColor(255, 33, 0));
DefineGlobalColor("86" , CreateColor(255, 25, 0));
DefineGlobalColor("87" , CreateColor(255, 16, 0));
DefineGlobalColor("88" , CreateColor(255, 8, 0));
DefineGlobalColor("89" , CreateColor(255, 0, 0));
DefineGlobalColor("90" , CreateColor(246, 0, 0));
DefineGlobalColor("91" , CreateColor(223, 5, 5));
DefineGlobalColor("92" , CreateColor(201, 9, 9));
DefineGlobalColor("93" , CreateColor(178, 14, 14));
DefineGlobalColor("94" , CreateColor(155, 19, 19));
DefineGlobalColor("95" , CreateColor(133, 23, 23));
DefineGlobalColor("96" , CreateColor(110, 28, 28));
DefineGlobalColor("97" , CreateColor(87, 33, 33));
DefineGlobalColor("98" , CreateColor(65, 37, 37));
DefineGlobalColor("99" , CreateColor(42, 42, 42));
DefineGlobalColor("100" , CreateColor(34, 0, 39));
#// Breach sources
script IMI {
input src = close;
input length = 14;
def o = src[1];
def c = src;
def CloseOpenDiff = if c > o then c - o else 0;
def OpenCloseDiff = if c < o then o - c else 0;
def avgCloseOpen = Average(CloseOpenDiff, length);
def avgOpenClose = Average(OpenCloseDiff, length);
def IMI = avgCloseOpen / (avgCloseOpen + avgOpenClose) * 100;
plot return = IMI;
}
script TMO {
input src = close;
input length = 14;
input calcLength = 5;
input smoothLength = 3;
def o = src[1];
def c = src;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 10
else if c < getValue(o, i)
then 0
else 5);
def EMA5 = ExpAverage(data, calcLength);
def tmo = ExpAverage(EMA5, smoothLength);
plot return = tmo;
}
script WR {
input src = close;
input length = 10;
def hWR = Max(src, src[1]);
def lWR = Min(src, src[1]);
def hh = Highest(hWR, length);
def ll = Lowest(lWR, length);
def result = if hh == ll then -100 else (hh - src) / (hh - ll) * (-100);
def WR = if result > 0 then 0 else result;
plot return = WR;
}
# stoch(source, high, low, length) =>
script stoch {
input src = close;
input h = high;
input l = low;
input len = 10;
def stoch = 100 * (src - Lowest(l, len)) / (Highest(h, len) - Lowest(l, len));
plot return = stoch;
}
script TSI {
input src = close;
input longLength = 25;
input shortLength = 13;
input signalLength = 3;
def diff = src - src[1];
def doubleSmoothedAbsDiff = ExpAverage(ExpAverage(AbsValue(diff), longLength), shortLength);
def TSI = if doubleSmoothedAbsDiff == 0 then 0
else 100 * (ExpAverage(ExpAverage(diff, longLength), shortLength)) / doubleSmoothedAbsDiff;
def Signal = ExpAverage(TSI, signalLength);
plot return = Signal;
}
#uoAverage(bp, trange, length) =>
script uoAverage {
input bp = 1;
input trange = 0.1;
input length = 10;
def result = Sum(bp, length) / Sum(trange, length);
plot return = result;
}
#xport uo(simple int fastLen, simple int midLen, simple int slowLen) =>
script uo {
input src = close;
input fastLen = 10;
input midLen = 20;
input slowLen = 50;
def tMax = Max(src, src[1]);
def tMin = Min(src, src[1]);
def tr = tMax - tMin;
def bp = src - tMin;
def avg1 = uoAverage(bp, tr, fastLen);
def avg2 = uoAverage(bp, tr, midLen);
def avg3 = uoAverage(bp, tr, slowLen);
def result = 100 * (4 * avg1 + 2 * avg2 + avg3) / 7;
plot return = result;
}
#filter(float src, int len) =>
script filter {
input src = close;
input len = 10;
def filter;
filter = TotalSum((src + (src[1] * 2) + (src[2] * 2) + src[3]) / 6);
def filt = (filter - filter[len]) / len;
plot return = filt;
}
#rsi(src, len, study, filter) =>
script osc {
input src = close;
input len = 8;
input study = 50;
input filt = close;
def rsia;
def filter = filt;
def rsi = study;
def f = -power(AbsValue(AbsValue(rsi - 50) - 50), 1 + power(len / 14, 0.618) - 1) / power(50, power(len / 14, 0.618) - 1) + 50;
rsia = if rsi > 50 then f + 50 else -f + 50;
plot return = rsia;
}
def osc1Type;
def filter = filter(src, 1);
def nRSI1 = RSI(Price = filter, Length = Length);
switch (oscType) {
case RSI:
osc1Type = nRSI1;
case TMO:
osc1Type = TMO(filter, Length);
case StochRSI:
osc1Type = Average(stoch(filter, filter, filter, Length), 3);
case MFI:
osc1Type = MoneyFlowIndex(Length = Length);
case UltimateOsc:
osc1Type = uo(filter, Length / 2, Length, Length * 2);
case TSI:
osc1Type = TSI(filter, Length * 2, Length);
case IntradayMomIndex:
osc1Type = IMI(filter, Length);
}
def osc = osc(src, length, osc1Type, filter);
def oscValue = osc;
plot line = if isNaN(c) then na else oscValue;
plot os = if isNaN(c) then na else overSold;
os.SetDefaultColor(Color.DARK_GREEN);
plot ob = if isNaN(c) then na else overBought;
ob.SetDefaultColor(Color.DARK_RED);
plot Mid = if isNaN(c) then na else 50;
Mid.SetDefaultColor(Color.DARK_GRAY);
Mid.SetStyle(Curve.SHORT_DASH);
line.SetLineWeight(2);
line.AssignValueColor(if oscValue<=0 then GlobalColor("0") else
if oscValue<=1 then GlobalColor("1") else
if oscValue<=2 then GlobalColor("2") else
if oscValue<=3 then GlobalColor("3") else
if oscValue<=4 then GlobalColor("4") else
if oscValue<=5 then GlobalColor("5") else
if oscValue<=6 then GlobalColor("6") else
if oscValue<=7 then GlobalColor("7") else
if oscValue<=8 then GlobalColor("8") else
if oscValue<=9 then GlobalColor("9") else
if oscValue<=10 then GlobalColor("10") else
if oscValue<=11 then GlobalColor("11") else
if oscValue<=12 then GlobalColor("12") else
if oscValue<=13 then GlobalColor("13") else
if oscValue<=14 then GlobalColor("14") else
if oscValue<=15 then GlobalColor("15") else
if oscValue<=16 then GlobalColor("16") else
if oscValue<=17 then GlobalColor("17") else
if oscValue<=18 then GlobalColor("18") else
if oscValue<=19 then GlobalColor("19") else
if oscValue<=20 then GlobalColor("20") else
if oscValue<=21 then GlobalColor("21") else
if oscValue<=22 then GlobalColor("22") else
if oscValue<=23 then GlobalColor("23") else
if oscValue<=24 then GlobalColor("24") else
if oscValue<=25 then GlobalColor("25") else
if oscValue<=26 then GlobalColor("26") else
if oscValue<=27 then GlobalColor("27") else
if oscValue<=28 then GlobalColor("28") else
if oscValue<=29 then GlobalColor("29") else
if oscValue<=30 then GlobalColor("30") else
if oscValue<=31 then GlobalColor("31") else
if oscValue<=32 then GlobalColor("32") else
if oscValue<=33 then GlobalColor("33") else
if oscValue<=34 then GlobalColor("34") else
if oscValue<=35 then GlobalColor("35") else
if oscValue<=36 then GlobalColor("36") else
if oscValue<=37 then GlobalColor("37") else
if oscValue<=38 then GlobalColor("38") else
if oscValue<=39 then GlobalColor("39") else
if oscValue<=40 then GlobalColor("40") else
if oscValue<=41 then GlobalColor("41") else
if oscValue<=42 then GlobalColor("42") else
if oscValue<=43 then GlobalColor("43") else
if oscValue<=44 then GlobalColor("44") else
if oscValue<=45 then GlobalColor("45") else
if oscValue<=46 then GlobalColor("46") else
if oscValue<=47 then GlobalColor("47") else
if oscValue<=48 then GlobalColor("48") else
if oscValue<=49 then GlobalColor("49") else
if oscValue<=50 then GlobalColor("50") else
if oscValue<=51 then GlobalColor("51") else
if oscValue<=52 then GlobalColor("52") else
if oscValue<=53 then GlobalColor("53") else
if oscValue<=54 then GlobalColor("54") else
if oscValue<=55 then GlobalColor("55") else
if oscValue<=56 then GlobalColor("56") else
if oscValue<=57 then GlobalColor("57") else
if oscValue<=58 then GlobalColor("58") else
if oscValue<=59 then GlobalColor("59") else
if oscValue<=60 then GlobalColor("60") else
if oscValue<=61 then GlobalColor("61") else
if oscValue<=62 then GlobalColor("62") else
if oscValue<=63 then GlobalColor("63") else
if oscValue<=64 then GlobalColor("64") else
if oscValue<=65 then GlobalColor("65") else
if oscValue<=66 then GlobalColor("66") else
if oscValue<=67 then GlobalColor("67") else
if oscValue<=68 then GlobalColor("68") else
if oscValue<=69 then GlobalColor("69") else
if oscValue<=70 then GlobalColor("70") else
if oscValue<=71 then GlobalColor("71") else
if oscValue<=72 then GlobalColor("72") else
if oscValue<=73 then GlobalColor("73") else
if oscValue<=74 then GlobalColor("74") else
if oscValue<=75 then GlobalColor("75") else
if oscValue<=76 then GlobalColor("76") else
if oscValue<=77 then GlobalColor("77") else
if oscValue<=78 then GlobalColor("78") else
if oscValue<=79 then GlobalColor("79") else
if oscValue<=80 then GlobalColor("80") else
if oscValue<=81 then GlobalColor("81") else
if oscValue<=82 then GlobalColor("82") else
if oscValue<=83 then GlobalColor("83") else
if oscValue<=84 then GlobalColor("84") else
if oscValue<=85 then GlobalColor("85") else
if oscValue<=86 then GlobalColor("86") else
if oscValue<=87 then GlobalColor("87") else
if oscValue<=88 then GlobalColor("88") else
if oscValue<=89 then GlobalColor("89") else
if oscValue<=90 then GlobalColor("90") else
if oscValue<=91 then GlobalColor("91") else
if oscValue<=92 then GlobalColor("92") else
if oscValue<=93 then GlobalColor("93") else
if oscValue<=94 then GlobalColor("94") else
if oscValue<=95 then GlobalColor("95") else
if oscValue<=96 then GlobalColor("96") else
if oscValue<=97 then GlobalColor("97") else
if oscValue<=98 then GlobalColor("98") else
if oscValue<=99 then GlobalColor("99") else GlobalColor("100"));
AssignPriceColor(if !BarColor then Color.CURRENT else
if oscValue<=0 then GlobalColor("0") else
if oscValue<=1 then GlobalColor("1") else
if oscValue<=2 then GlobalColor("2") else
if oscValue<=3 then GlobalColor("3") else
if oscValue<=4 then GlobalColor("4") else
if oscValue<=5 then GlobalColor("5") else
if oscValue<=6 then GlobalColor("6") else
if oscValue<=7 then GlobalColor("7") else
if oscValue<=8 then GlobalColor("8") else
if oscValue<=9 then GlobalColor("9") else
if oscValue<=10 then GlobalColor("10") else
if oscValue<=11 then GlobalColor("11") else
if oscValue<=12 then GlobalColor("12") else
if oscValue<=13 then GlobalColor("13") else
if oscValue<=14 then GlobalColor("14") else
if oscValue<=15 then GlobalColor("15") else
if oscValue<=16 then GlobalColor("16") else
if oscValue<=17 then GlobalColor("17") else
if oscValue<=18 then GlobalColor("18") else
if oscValue<=19 then GlobalColor("19") else
if oscValue<=20 then GlobalColor("20") else
if oscValue<=21 then GlobalColor("21") else
if oscValue<=22 then GlobalColor("22") else
if oscValue<=23 then GlobalColor("23") else
if oscValue<=24 then GlobalColor("24") else
if oscValue<=25 then GlobalColor("25") else
if oscValue<=26 then GlobalColor("26") else
if oscValue<=27 then GlobalColor("27") else
if oscValue<=28 then GlobalColor("28") else
if oscValue<=29 then GlobalColor("29") else
if oscValue<=30 then GlobalColor("30") else
if oscValue<=31 then GlobalColor("31") else
if oscValue<=32 then GlobalColor("32") else
if oscValue<=33 then GlobalColor("33") else
if oscValue<=34 then GlobalColor("34") else
if oscValue<=35 then GlobalColor("35") else
if oscValue<=36 then GlobalColor("36") else
if oscValue<=37 then GlobalColor("37") else
if oscValue<=38 then GlobalColor("38") else
if oscValue<=39 then GlobalColor("39") else
if oscValue<=40 then GlobalColor("40") else
if oscValue<=41 then GlobalColor("41") else
if oscValue<=42 then GlobalColor("42") else
if oscValue<=43 then GlobalColor("43") else
if oscValue<=44 then GlobalColor("44") else
if oscValue<=45 then GlobalColor("45") else
if oscValue<=46 then GlobalColor("46") else
if oscValue<=47 then GlobalColor("47") else
if oscValue<=48 then GlobalColor("48") else
if oscValue<=49 then GlobalColor("49") else
if oscValue<=50 then GlobalColor("50") else
if oscValue<=51 then GlobalColor("51") else
if oscValue<=52 then GlobalColor("52") else
if oscValue<=53 then GlobalColor("53") else
if oscValue<=54 then GlobalColor("54") else
if oscValue<=55 then GlobalColor("55") else
if oscValue<=56 then GlobalColor("56") else
if oscValue<=57 then GlobalColor("57") else
if oscValue<=58 then GlobalColor("58") else
if oscValue<=59 then GlobalColor("59") else
if oscValue<=60 then GlobalColor("60") else
if oscValue<=61 then GlobalColor("61") else
if oscValue<=62 then GlobalColor("62") else
if oscValue<=63 then GlobalColor("63") else
if oscValue<=64 then GlobalColor("64") else
if oscValue<=65 then GlobalColor("65") else
if oscValue<=66 then GlobalColor("66") else
if oscValue<=67 then GlobalColor("67") else
if oscValue<=68 then GlobalColor("68") else
if oscValue<=69 then GlobalColor("69") else
if oscValue<=70 then GlobalColor("70") else
if oscValue<=71 then GlobalColor("71") else
if oscValue<=72 then GlobalColor("72") else
if oscValue<=73 then GlobalColor("73") else
if oscValue<=74 then GlobalColor("74") else
if oscValue<=75 then GlobalColor("75") else
if oscValue<=76 then GlobalColor("76") else
if oscValue<=77 then GlobalColor("77") else
if oscValue<=78 then GlobalColor("78") else
if oscValue<=79 then GlobalColor("79") else
if oscValue<=80 then GlobalColor("80") else
if oscValue<=81 then GlobalColor("81") else
if oscValue<=82 then GlobalColor("82") else
if oscValue<=83 then GlobalColor("83") else
if oscValue<=84 then GlobalColor("84") else
if oscValue<=85 then GlobalColor("85") else
if oscValue<=86 then GlobalColor("86") else
if oscValue<=87 then GlobalColor("87") else
if oscValue<=88 then GlobalColor("88") else
if oscValue<=89 then GlobalColor("89") else
if oscValue<=90 then GlobalColor("90") else
if oscValue<=91 then GlobalColor("91") else
if oscValue<=92 then GlobalColor("92") else
if oscValue<=93 then GlobalColor("93") else
if oscValue<=94 then GlobalColor("94") else
if oscValue<=95 then GlobalColor("95") else
if oscValue<=96 then GlobalColor("96") else
if oscValue<=97 then GlobalColor("97") else
if oscValue<=98 then GlobalColor("98") else
if oscValue<=99 then GlobalColor("99") else GlobalColor("100"));
#---- END CODE