Conversión del indicador personal de Trading View

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #225021 quote
    gobagoba
    Participant
    New

    Buenos días.

    Estoy intentando insertar el código de un indicador de Trading View en ProRealTime, pero me da un error de código.
    ¿Sabe alguien si puedo replicarlo en ProRealTime, o si puedo subsanar estos 2 errores de código que me da?.
    Muchas gracias.
    . Dejo el código en texto por si se necesita copiar, y adjunto un jpg donde se ve el error:

    //@version=5
    indicator(title=”El Inversor de TikTok”, shorttitle=”El Inversor de TikTok”, format=format.price, precision=2, timeframe=””, timeframe_gaps=true)
    smoothK = input.int(3, “K”, minval=1)
    smoothD = input.int(3, “D”, minval=1)
    lengthRSI = input.int(14, “RSI Length”, minval=1)
    lengthStoch = input.int(14, “Stochastic Length”, minval=1)
    src = input(close, title=”RSI Source”)
    rsi1 = ta.rsi(src, lengthRSI)
    k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
    d = ta.sma(k, smoothD)
    plot(k, “K”, color=#020202, linewidth = 2)
    h0 = hline(80, “Upper Band”, color=#fc0000)
    h1 = hline(20, “Lower Band”, color=#00fd15)

    Captura-de-pantalla-2023-12-07-150402-2.png Captura-de-pantalla-2023-12-07-150402-2.png
    #225535 quote
    Jean FXJean FX
    Moderator
    Junior

    Aquí lo tienes :

    smoothk=3
    smoothd=3
    lenghtrsi=14
    lenghtstoch=14
    
    rsi1=RSI[lenghtRSI](customclose)
    k=Stochastic[lenghtrsi,smoothk](rsi1,rsi1,rsi1)
    d=Stochasticd[lenghtRSI,smoothk,smoothd](close)
    
    return k as "k" , 80 as "80" coloured("red"),20 as "20" coloured("green")
    Nicolas thanked this post
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

Conversión del indicador personal de Trading View


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
goba @goba Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Jean FXJean FX
2 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 12/07/2023
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...