OPEN-SOURCE SCRIPT
TUNEL DOMENEC

//version=6
indicator('TUNEL DOMENEC', shorttitle = 'TUNEL DOMENEC', overlay = true, max_bars_back = 3000)
// Genial Line
// Parámetros
VelasBanda = 20
Desviacio = 3.14159265358979
var SmoothPrice = close
var SmoothRange = 0.0
// Cálculo de valores suavizados
if bar_index > 1
SmoothPrice := (SmoothPrice[1] * (VelasBanda - 1) + close) / VelasBanda
SmoothRange := (SmoothRange[1] * (VelasBanda - 1) + (high - low)) / VelasBanda
Alt1 = (SmoothPrice + SmoothRange * Desviacio)
Baix1 = (SmoothPrice - SmoothRange * Desviacio)
Mitjana = (Alt1 + Baix1) / 2
// Función para calcular DEMA
dema(src, length) =>
ema1 = ta.ema(src, length)
ema2 = ta.ema(ema1, length)
2 * ema1 - ema2
Alt = dema(Alt1, VelasBanda)
Baix = dema(Baix1, VelasBanda)
// Cálculo de c9
c9 = (Mitjana + ta.sma(close, 34)) / 2
color_genial = c9 > c9[1] ? color.blue : color.red
genialplot = plot(c9 , color = color_genial, style = plot.style_cross, join = false, linewidth = 2, title = 'GENIAL LINE')
// End Genial Line
indicator('TUNEL DOMENEC', shorttitle = 'TUNEL DOMENEC', overlay = true, max_bars_back = 3000)
// Genial Line
// Parámetros
VelasBanda = 20
Desviacio = 3.14159265358979
var SmoothPrice = close
var SmoothRange = 0.0
// Cálculo de valores suavizados
if bar_index > 1
SmoothPrice := (SmoothPrice[1] * (VelasBanda - 1) + close) / VelasBanda
SmoothRange := (SmoothRange[1] * (VelasBanda - 1) + (high - low)) / VelasBanda
Alt1 = (SmoothPrice + SmoothRange * Desviacio)
Baix1 = (SmoothPrice - SmoothRange * Desviacio)
Mitjana = (Alt1 + Baix1) / 2
// Función para calcular DEMA
dema(src, length) =>
ema1 = ta.ema(src, length)
ema2 = ta.ema(ema1, length)
2 * ema1 - ema2
Alt = dema(Alt1, VelasBanda)
Baix = dema(Baix1, VelasBanda)
// Cálculo de c9
c9 = (Mitjana + ta.sma(close, 34)) / 2
color_genial = c9 > c9[1] ? color.blue : color.red
genialplot = plot(c9 , color = color_genial, style = plot.style_cross, join = false, linewidth = 2, title = 'GENIAL LINE')
// End Genial Line
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.