Rainbow chart

Viewing 6 posts - 1 through 6 (of 6 total)
  • #204696

    Buonasera a tutti,
    sarebbe possibile convertire questo indicatore per PRT? allego screenshot

    grazie a tutti
    _____________________________________________________________________________________________________________________

    StudyName = “BEST Rainbow Chart”
    study(StudyName, shorttitle=StudyName, overlay=true, precision=4)

    Mode = input(title = “MA Mode”, defval=”SMMA”, options=[“ALMA”, “EMA”, “DEMA”, “TEMA”, “WMA”, “VWMA”, “SMA”, “SMMA”])
    Period = input(defval=20, title=’Fast SMA’, type=input.integer, minval=2, step=1)
    Number = input(defval=5, title=’Number of MA’, type=input.integer, minval=1, maxval=5, step=1)

    ma(type, src, len) =>

    float result = 0.0

    if type==”SMA” // Simple
    result := sma(src, len)
    if type==”EMA” // Exponential
    result := ema(src, len)
    if type==”DEMA” // Double Exponential
    e = ema(src, len)
    result := 2 * e – ema(e, len)
    if type==”TEMA” // Triple Exponential
    e = ema(src, len)
    result := 3 * (e – ema(e, len)) + ema(ema(e, len), len)
    if type==”WMA” // Weighted
    result := wma(src, len)
    if type==”VWMA” // Volume Weighted
    result := vwma(src, len)
    if type==”SMMA” // Smoothed
    w = wma(src, len)
    result := na(w[1]) ? sma(src, len) : (w[1] * (len – 1) + src) / len

    result

    f_number_ma() =>

    float MA1 = 0.0
    float MA2 = 0.0
    float MA3 = 0.0
    float MA4 = 0.0
    float MA5 = 0.0

    if Number == 1
    MA1 := ma(Mode, close, Period)

    if Number == 2
    MA1 := ma(Mode, close, Period)
    MA2 := ma(Mode, MA1, Period)

    if Number == 3
    MA1 := ma(Mode, close, Period)
    MA2 := ma(Mode, MA1, Period)
    MA3 := ma(Mode, MA2, Period)

    if Number == 4
    MA1 := ma(Mode, close, Period)
    MA2 := ma(Mode, MA1, Period)
    MA3 := ma(Mode, MA2, Period)
    MA4 := ma(Mode, MA3, Period)

    if Number == 5
    MA1 := ma(Mode, close, Period)
    MA2 := ma(Mode, MA1, Period)
    MA3 := ma(Mode, MA2, Period)
    MA4 := ma(Mode, MA3, Period)
    MA5 := ma(Mode, MA4, Period)

    [MA1, MA2, MA3, MA4, MA5]

    [MA1, MA2, MA3, MA4, MA5] = f_number_ma()

    // Display the Moving Averages

    plot(MA1, title=’MA 1′, color=color.blue, linewidth=3, style=plot.style_line)
    plot(MA2, title=’MA 2′, color=color.purple, linewidth=3, style=plot.style_line)
    plot(MA3, title=’MA 3′, color=color.red, linewidth=3, style=plot.style_line)
    plot(MA4, title=’MA 4′, color=color.orange, linewidth=3, style=plot.style_line)
    plot(MA5, title=’MA 5′, color=color.fuchsia , linewidth=3, style=plot.style_line)

    #204733

    Questo indicatore visualizza un massimo di 5 medie mobili calcolate sull'ultima calcolata in precedenza. Risulta quindi media mobile double smoothed ad eccezione della prima che è calcolata sul prezzo Close.

    1 user thanked author for this post.
    #204744

    L'indicatore è stato convertito in prorealtime, lo trovi qui: Best of Rainbow MA

    1 user thanked author for this post.
    #204809

    Something like this?

    Qualcosa come questo?

    #204812

    Or like this?

    O così?

    #204820

    @Zigo

    Per favore:
    • usa solo la lingua del forum
    • non inserire immagini/files all’interno del testo del messaggio; il pulsante “Select File” è sufficiente per gli allegati.
    Grazie 🙂

     

Viewing 6 posts - 1 through 6 (of 6 total)

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