Stochastic + RSI Oscillator

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #252425 quote
    GigiGigi
    Participant
    Senior

    Bonjour,

    serait il possible de convertir cet indicateur Tradingview? Par avance, merci.

    indicator-tradingview.docx
    #252428 quote
    Iván GonzálezIván González
    Moderator
    Legend

    voici

    // ============================================================
    //PRC_Stochastic + RSI Oscillator with Signals [by TitikSona]
    //version = 0
    //10.10.2025
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    // ============================================================
    // ==================== PARÁMETROS DE USUARIO =================
    k1period = 12      // Periodo %K Stochastic 1
    d1period = 3       // Periodo %D Stochastic 1
    slowing1 = 20      // Suavizado Stochastic 1
    k2period = 100     // Periodo %K Stochastic 2
    d2period = 8       // Periodo %D Stochastic 2
    slowing2 = 8       // Suavizado Stochastic 2
    rsiperiod = 26     // Periodo RSI
    rsiupper = 70      // Nivel RSI Superior
    rsilower = 30      // Nivel RSI Inferior
    // ============================================================
    // ==================== CÁLCULOS DE INDICADORES ===============
    // Stochastic 1
    stoch1k = Average[slowing1]((close - Lowest[k1period](low)) / (Highest[k1period](high) - Lowest[k1period](low)) * 100)
    stoch1d = Average[d1period](stoch1k)
    
    // Stochastic 2
    stoch2k = Average[slowing2]((close - Lowest[k2period](low)) / (Highest[k2period](high) - Lowest[k2period](low)) * 100)
    stoch2d = Average[d2period](stoch2k)
    
    // RSI
    myrsi = RSI[rsiperiod](close)
    // ============================================================
    // ==================== CONDICIONES DE SEÑALES ================
    // Zona de sobreventa
    stochoversold = (stoch1k <= 20 AND stoch2k <= 20) OR (stoch1d <= 20 AND stoch2d <= 20)
    
    // Zona de sobrecompra
    stochoverbought = (stoch1k >= 80 AND stoch2k >= 80) OR (stoch1d >= 80 AND stoch2d >= 80)
    
    // RSI dentro del rango válido
    rsiinrange = myrsi >= rsilower AND myrsi <= rsiupper
    
    // Señales de compra y venta
    buysignal = stochoversold AND rsiinrange
    sellsignal = stochoverbought AND rsiinrange
    // ==========================================================
    // ==================== SEÑALES GRÁFICAS ====================
    // Buy signal
    IF buysignal and buysignal[1]=0 THEN
       drawarrowup(barindex,15)COLOURED(0,255,0)
    ENDIF
    
    // Sell signal
    IF sellsignal and sellsignal[1]=0 THEN
       drawarrowdown(barindex,85)COLOURED(255,0,0)
    ENDIF
    // ========================================================
    // ==================== COLOR DE FONDO ====================
    IF stoch1k >= 80 OR stoch2k >= 80 THEN
       BACKGROUNDCOLOR(255,0,0,40)
    ELSIF stoch1k <= 20 OR stoch2k <= 20 THEN
       BACKGROUNDCOLOR(0,255,0,40)
    ENDIF
    // ============================================================
    RETURN stoch1k COLOURED(0,0,255) AS "Stoch 1 K",stoch1d COLOURED(255,165,0) AS "Stoch 1 D", stoch2k COLOURED(0,255,0) AS "Stoch 2 K",stoch2d COLOURED(255,0,0) AS "Stoch 2 D", myrsi COLOURED(128,0,128) AS "RSI",20 COLOURED(0,255,0) STYLE(dottedline),50 COLOURED(128,128,128) STYLE(dottedline),80 COLOURED(255,0,0) STYLE(dottedline), rsiupper COLOURED(255,0,0) STYLE(dottedline),rsilower COLOURED(0,255,0) STYLE(dottedline)
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Stochastic + RSI Oscillator


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Gigi @gigi Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/10/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...