MCDX INDICATOR

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #234954 quote
    jcl
    Participant
    Junior

    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

    MCDXDaxM5.png MCDXDaxM5.png
    #234976 quote
    Iván González
    Moderator
    Master

    Buenas!
    Aquí lo tienes:

    //-----------------------------------------------------------------//
    //PRC_MCDX (rsi)
    //version = 0
    //09.07.2024
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //-----------------------------------------------------------------//
    //-----Inputs------------------------------------------------------//
    RSIBaseBanker=50 //Banker Base
    RSIPeriodBanker=50 //Banker RSI Period
    RSIBaseHotMoney=30 //Hot Money RSI base
    RSIPeriodHotMoney=40 //Hot Money RSI Period
    SensivityBanker=1.5 //Sensivity banker
    SensivityHotMoney=0.7 //Sensivity Hot Money
    //-----------------------------------------------------------------//
    //-----RSI Banker--------------------------------------------------//
    rsiBanker=SensivityBanker*(rsi[RSIPeriodBanker](close)-RSIBaseBanker)
    if rsiBanker>20 then
    rsiBanker=20
    elsif rsiBanker<0 then
    rsiBanker=0
    endif
    //-----------------------------------------------------------------//
    //-----RSI HotMoney------------------------------------------------//
    rsiHotMoney=SensivityHotMoney*(rsi[RSIPeriodHotMoney](close)-RSIBaseHotMoney)
    if rsiHotMoney>20 then
    rsiHotMoney=20
    elsif rsiHotMoney<0 then
    rsiHotMoney=0
    endif
    //-----------------------------------------------------------------//
    //-----------------------------------------------------------------//
    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)
    jcl thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

MCDX INDICATOR


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
jcl @jcl Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván González
1 year, 8 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 07/08/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...