Rainbow chart
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Rainbow chart
- This topic has 5 replies, 4 voices, and was last updated 1 year ago by robertogozzi.
-
-
11/23/2022 at 6:22 PM #204696
Buonasera a tutti,
sarebbe possibile convertire questo indicatore per PRT? allego screenshotgrazie 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) / lenresult
f_number_ma() =>
float MA1 = 0.0
float MA2 = 0.0
float MA3 = 0.0
float MA4 = 0.0
float MA5 = 0.0if 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)11/24/2022 at 9:20 AM #204733Questo 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.
11/24/2022 at 9:34 AM #204744L'indicatore è stato convertito in prorealtime, lo trovi qui: Best of Rainbow MA
1 user thanked author for this post.
11/25/2022 at 12:10 PM #20480911/25/2022 at 12:11 PM #20481211/25/2022 at 12:54 PM #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 🙂 -
AuthorPosts
Find exclusive trading pro-tools on