MCDX INDICATOR

Viewing 2 posts - 1 through 2 (of 2 total)
  • #234954
    jcl

    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)
    Gracias

    CSS:
    #// © 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 Code

    #234976

    Buenas!
    Aquí lo tienes:

    1 user thanked author for this post.
    avatar jcl
Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login