Conversion Market Thrust Indicator de Trading View
- This topic has 3 replies, 3 voices, and was last updated 4 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
Similar topics:
Forums › ProRealTime forum Français › Support ProBuilder › Conversion Market Thrust Indicator de Trading View
Bonjour,
Voici le lien d’origine. https://www.tradingview.com/script/nM15ApmU-Market-Thrust-Indicator/
The Market Thrust indicator is a powerful measure of the stock market’s internal strength or weakness. There are four components to this indicator:
1-Advancing Issues on the New York Stock Exchange (NYSE) – $ADV
2-Advancing Volume on the NYSE – $UVOL
3-Declining Issues on the NYSE – $DECL
4-Declining Volume on the NYSE – $DVOL
//@version=4
study(shorttitle=”MTI”, title=”Market Thrust Indicator”, overlay=false)
m_src = input(close, title=”Fuente para calculo de MTI”)
ma_type = input(defval=”SMA”, title=”MA Tipo: “, options=[“SMA”, “EMA”, “WMA”, “VWMA”, “SMMA”, “DEMA”, “TEMA”, “HullMA”, “ZEMA”, “TMA”, “SSMA”])
ma_len = input(defval=20, title=”MA Periodo”, minval=1)
reaction = input(defval=1, title=”MA Reaccion”, minval=1)
adv = security(“USI:ADV”, timeframe.period, m_src)
uvol = security(“USI:UVOL”, timeframe.period, m_src)
decl = security(“USI:DECL”, timeframe.period, m_src)
dvol = security(“USI:DVOL”, timeframe.period, m_src)
mti = (adv * uvol) – (decl * dvol)
ma_src = mti
// SuperSmoother filter
// © 2013 John F. Ehlers
variant_supersmoother(src, len) =>
a1 = exp(-1.414 * 3.14159 / len)
b1 = 2 * a1 * cos(1.414 * 3.14159 / len)
c2 = b1
c3 = -a1 * a1
c1 = 1 – c2 – c3
v9 = 0.0
v9 := c1 * (src + nz(src[1])) / 2 + c2 * nz(v9[1]) + c3 * nz(v9[2])
v9
variant_smoothed(src, len) =>
v5 = 0.0
sma_1 = sma(src, len)
v5 := na(v5[1]) ? sma_1 : (v5[1] * (len – 1) + src) / len
v5
variant_zerolagema(src, len) =>
ema1 = ema(src, len)
ema2 = ema(ema1, len)
v10 = ema1 + ema1 – ema2
v10
variant_doubleema(src, len) =>
v2 = ema(src, len)
v6 = 2 * v2 – ema(v2, len)
v6
variant_tripleema(src, len) =>
v2 = ema(src, len)
v7 = 3 * (v2 – ema(v2, len)) + ema(ema(v2, len), len)
v7
variant(type, src, len) =>
ema_1 = ema(src, len)
wma_1 = wma(src, len)
vwma_1 = vwma(src, len)
variant_smoothed__1 = variant_smoothed(src, len)
variant_doubleema__1 = variant_doubleema(src, len)
variant_tripleema__1 = variant_tripleema(src, len)
wma_2 = wma(src, len / 2)
wma_3 = wma(src, len)
wma_4 = wma(2 * wma_2 – wma_3, round(sqrt(len)))
variant_supersmoother__1 = variant_supersmoother(src, len)
variant_zerolagema__1 = variant_zerolagema(src, len)
sma_1 = sma(src, len)
sma_2 = sma(sma_1, len)
sma_3 = sma(src, len)
type == “EMA” ? ema_1 : type == “WMA” ? wma_1 :
type == “VWMA” ? vwma_1 : type == “SMMA” ? variant_smoothed__1 :
type == “DEMA” ? variant_doubleema__1 : type == “TEMA” ? variant_tripleema__1 :
type == “HullMA” ? wma_4 : type == “SSMA” ? variant_supersmoother__1 :
type == “ZEMA” ? variant_zerolagema__1 : type == “TMA” ? sma_2 : sma_3
// === Moving Average
ma_series = variant(ma_type, ma_src, ma_len)
direction = 0
falling_1 = falling(ma_series, reaction)
direction := rising(ma_series, reaction) ? 1 : falling_1 ? -1 : nz(direction[1])
change_direction = change(direction, 1)
pcol = direction > 0 ? color.lime : direction < 0 ? color.red : na // A pintar hline(0, title='Pi', color=color.black, linestyle=hline.style_dotted, linewidth=1, title="Nivel 0") plot(mti, color=color.black, linewidth=2, transp=0, title="MTI") plot(ma_series, color=pcol, style=plot.style_line, join=true, linewidth=3, transp=10, title="MA")
Désolé mais cet indicateur utilise 4 instruments différents pour ses calculs, hors nous n’avons pas encore de support multi instruments dans ProBuilder 🙁 Mais ne désespérons pas, cela viendra après le MTF pour ProBuilder prévu en 2020.
Find exclusive trading pro-tools on