Rainbow chart

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #204696 quote
    lowbatlowbat
    Participant
    Senior

    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)

    1-3.png 1-3.png
    #204733 quote
    NicolasNicolas
    Keymaster
    Legend

    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.

    lowbat thanked this post
    #204744 quote
    NicolasNicolas
    Keymaster
    Legend

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

    lowbat thanked this post
    best-rainbow-ma-1.png best-rainbow-ma-1.png
    #204809 quote
    ZigoZigo
    Participant
    Master

    Something like this?

    Qualcosa come questo?

    COG-1-u-grafiek.png COG-1-u-grafiek.png
    #204812 quote
    ZigoZigo
    Participant
    Master

    Or like this?

    O così?

    cog-12-min.png cog-12-min.png
    #204820 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    @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)
  • 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

Rainbow chart


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
lowbat @lowbat Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by robertogozzirobertogozzi
3 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 11/23/2022
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...