check above video to know how to use the indicator.
CODE:
CSS:
# https://www.tradingview.com/v/DlWtErRh/
#// © LOKEN94
#// Custom version based of [M2J] Indicator | MCDX
#study("LOKEN ? (v4) BULLISH MCDX v2.2", "?",precision=2)
# Converted by Sam4Cok@Samer800 - 09/2023
declare lower;
declare zerobase;
input RSIBaseBanker = 50;#, "Banker Base"
input RSIPeriodBanker = 50;#, "Banker RSI Period"
input RSIBaseHotMoney = 30;#, "Hot Money RSI Base"
input RSIPeriodHotMoney = 40;#, "Hot Money RSI Period"
input SensitivityBanker = 1.5;#, "Sensitivity Banker"
input SensitivityHotMoney = 0.7;#, "Sensitivity Hot Money"
input threshold = 8.5;
def na = Double.NaN;
def last = isNaN(Close);
DefineGlobalColor("nor", CreateColor(132, 175, 201));
#vwma(source, length)
script VWMA {
input src = close;
input len = 15;
def v_ = volume;
def v = if isNaN(v_) then 1 else v_;
def srcV = src * v;
def VWMA = Average(srcV, len) / Average(v, len);
plot result = VWMA;
}
#rsi_function(sensitivity, rsiPeriod, rsiBase) =>
script rsi_function {
input sensitivity = 1;
input rsiPeriod = 50;
input rsiBase = 1;
def nRSI = RSI(Price = close, Length = rsiPeriod);
def rsi_ = sensitivity * (nRSI - rsiBase);
def rsi = if rsi_ > 20 then 20 else
if rsi_ < 0 then 0 else rsi_;
plot out = rsi;
}
def rsi_Banker = rsi_function(SensitivityBanker, RSIPeriodBanker, RSIBaseBanker);
def rsi_HotMoney = rsi_function(SensitivityHotMoney, RSIPeriodHotMoney, RSIBaseHotMoney);
def hot = rsi_HotMoney;
def bank = rsi_Banker;
def hotMoney = hot;#, "Hot Money"
def hotma2 = WildersAverage(hot, 2);
def bankma2 = Average(bank, 2);
def hotma7 = WildersAverage(hot, 7);
def bankma7 = ExpAverage(bank, 7);
def hotma31 = WildersAverage(hot, 31);
def bankma31 = ExpAverage(bank, 31);
def hotma = ExpAverage(((hotma2 * 34) + (hotma7 * 33) + (hotma31 * 33)) / 100, 2);
def bankma = Average(((bankma2 * 70) + (bankma7 * 20) + (bankma31 * 10)) / 100, 2);
def hotsignal = WildersAverage(hotma, 2);
def banksignal = WildersAverage(bankma, 4);
def hotline = hotma; # "Hot Money MA"
def bankline = bankma;# "Banker MA"
def hotline2 = hotsignal;# "Hot Money MA2"
def bankline2 = banksignal; # "Banker MA2"
#//
AddCloud(hotline , hotline2, Color.DARK_GREEN, Color.DARK_RED);
AddCloud(bankline, bankline2, Color.VIOLET, Color.DARK_ORANGE);
AddCloud(hot, hotline, Color.GREEN, Color.RED);
#//
def hbAvg = ((hot*10)+(hotma*35)+(hotsignal*15)+(bankma*35)+(banksignal* 5))/ 100;
def hbma = vwma(hbAvg, 2);
plot HBMA2 = hbma; # "Trend Tracker"
HBMA2.AssignValueColor(if hbma > threshold then Color.CYAN else Color.MAGENTA);
plot h1 = if last then na else threshold;#, "Bullish Confirmation Line"
h1.SetDefaultColor(Color.GRAY);
h1.SetStyle(Curve.SHORT_DASH);
#//Crossing signals
def downtrendsignal = Crosses(hotma, hotsignal, CrossingDirection.BELOW);
def uptrendsignal = Crosses(hotma, hotsignal, CrossingDirection.ABOVE);
plot dnSig = if downtrendsignal then hbma else na;# "Downtrend signal"
plot upSig = if uptrendsignal then hbma else na; # "Uprend signal"
dnSig.SetStyle(Curve.POINTS);
upSig.SetStyle(Curve.POINTS);
dnSig.SetDefaultColor(Color.RED);
upSig.SetDefaultColor(Color.GREEN);
def dnCond = Bank<Bank[1] and Bank<Bank[2] and Bank[1]<Bank[2] and Bank<Bank[3] and Bank<Bank[4] and Bank[3]<Bank[4] and Bank[6]>8.5 and Bank<10;
plot Dump = if Bank<Bank[1]/1.75 then Bank else na;#, "Dump Candles"
plot DnCandle = if dnCond then Bank else na;#, "Down Candles"
plot PumpCandle = if Bank>hbma then Bank else na;# "Pump Candles"
plot Retest = if banksignal>bankma and Bank>0 then Bank else na; # "Retest Candles"
Dump.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
Retest.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
PumpCandle.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
DnCandle.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Dump.SetDefaultColor(Color.RED);
Retest.SetDefaultColor(Color.DARK_RED);
PumpCandle.SetDefaultColor(Color.GREEN);
DnCandle.SetDefaultColor(Color.DARK_GRAY);
plot Banker = bank;#, "Banker"
Banker.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Banker.AssignValueColor(if bank > 0 then GlobalColor("nor") else Color.DARK_GRAY);
#-- END of CODE