MCDX INDICATOR
Forums › ProRealTime foro Español › Soporte ProBuilder › MCDX INDICATOR
- This topic has 1 reply, 2 voices, and was last updated 4 months ago by Iván.
-
-
07/08/2024 at 3:31 PM #234954
Buenos días:
¿Sería posible traducir este código de tradingview a prorealtime?
Basado en múltiples RSI, buscamos detectar el impulso del comprador y del vendedor en función del precio y el volumen.
Este indicador ayuda a detectar actividades de compradores fuertes (manos fuertes – ballenas)
GraciasCSS:
#// © Mango2Juice
#// MCDX is an indicator based on mutilple relative strength index (RSI) with different period, then classify into 3 categories – Retailer, Hot Money and Banker
#// Green – Retailer
#// Yellow – Hot money
#// Red – Banker
#// the higher and many reds are more preferable
# study(“[M2J] Indicator | MCDX”, “MCDX”)
# Converted by Sam4Cok@Samer800 – 11/2022
declare lower;
input RSIBaseBanker = 50; # “Banker Base”, minval = 10)
input RSIPeriodBanker = 50; # “Banker RSI Period”, minval = 10)
input RSIBaseHotMoney = 30; # “Hot Money RSI Base”, minval = 10)
input RSIPeriodHotMoney = 40; # “Hot Money RSI Period”, minval = 10)
input SensitivityBanker = 1.5;# “Sensitivity Banker”, minval = 0.1, step = 0.1)
input SensitivityHotMoney = 0.7;# “Sensitivity Hot Money”, minval = 0.1, step = 0.1)def na = Double.NaN;
#rsi_function(sensitivity, rsiPeriod, rsiBase) =>
script rsi_function {
input sensitivity = 0;
input rsiPeriod = 14;
input rsiBase = 0;
def rsi = sensitivity * (rsi(Length=rsiPeriod) – rsiBase);
def nRSI;
if rsi > 20 {
nrsi = 20;
} else {
if rsi < 0 { nrsi = 0; } else { nrsi = rsi; }} plot result = nrsi; } def rsi_Banker = rsi_function(SensitivityBanker, RSIPeriodBanker, RSIBaseBanker); def rsi_HotMoney = rsi_function(SensitivityHotMoney, RSIPeriodHotMoney, RSIBaseHotMoney); plot "5" = if(isNaN(close),na,5);#, "5" , color.silver, 2, editable = false) "5".SetDefaultColor(Color.GRAY); "5".SetLineWeight(2); plot "10" = if(isNaN(close),na,10);#, "10", color.fuchsia, 2, editable = false) "10".SetDefaultColor(Color.MAGENTA); "10".SetLineWeight(2); plot "15" = if(isNaN(close),na,15);#, "15", color.silver, 2, editable = false) "15".SetDefaultColor(Color.GRAY); "15".SetLineWeight(2); plot Banker = if(isNaN(close),na,rsi_Banker);#, "Banker", #ff0000, 6, plot.style_histogram) Banker.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM); Banker.SetDefaultColor(CreateColor(255,0,0)); plot HotMoney = if(isNaN(close),na,rsi_HotMoney);#, "Hot Money", #d8c200, 6, plot.style_histogram) HotMoney.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM); HotMoney.SetDefaultColor(CreateColor(216,194,0)); plot Retailer = if(isNaN(close),na,20);# "Retailer", #005e07, 6, plot.style_histogram) Retailer.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM); Retailer.SetDefaultColor(CreateColor(0,94,7)); #--- END Code07/09/2024 at 8:03 AM #234976Buenas!
Aquí lo tienes:PRC_MCDX (rsi)123456789101112131415161718192021222324252627282930313233//-----------------------------------------------------------------////PRC_MCDX (rsi)//version = 0//09.07.2024//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-----------------------------------------------------------------////-----Inputs------------------------------------------------------//RSIBaseBanker=50 //Banker BaseRSIPeriodBanker=50 //Banker RSI PeriodRSIBaseHotMoney=30 //Hot Money RSI baseRSIPeriodHotMoney=40 //Hot Money RSI PeriodSensivityBanker=1.5 //Sensivity bankerSensivityHotMoney=0.7 //Sensivity Hot Money//-----------------------------------------------------------------////-----RSI Banker--------------------------------------------------//rsiBanker=SensivityBanker*(rsi[RSIPeriodBanker](close)-RSIBaseBanker)if rsiBanker>20 thenrsiBanker=20elsif rsiBanker<0 thenrsiBanker=0endif//-----------------------------------------------------------------////-----RSI HotMoney------------------------------------------------//rsiHotMoney=SensivityHotMoney*(rsi[RSIPeriodHotMoney](close)-RSIBaseHotMoney)if rsiHotMoney>20 thenrsiHotMoney=20elsif rsiHotMoney<0 thenrsiHotMoney=0endif//-----------------------------------------------------------------////-----------------------------------------------------------------//return 20 as "Retailer" coloured(0,94,7)style(histogram), rsiHotmoney as "Hot Money" coloured(216,194,0)style(histogram), rsiBanker as "Banker" coloured(255,0,0)style(histogram), 5 as "5" coloured("silver")style(line,2), 10 as "10" coloured("fuchsia")style(line,2),15 as "15"coloured("silver")style(line,2)1 user thanked author for this post.
-
AuthorPosts