搜索
产品
社区
市场
新闻
经纪商
更多
CN
开始
社区
/
指标和策略
/
Non-Lagging Indicator: EMA + TSI BY UTTAM PARAMANIK
OPEN-SOURCE SCRIPT
Non-Lagging Indicator: EMA + TSI BY UTTAM PARAMANIK
由uttamparamanik50提供
关注
关注
昨天
7
添加到收藏
添加到收藏
昨天
//
version
=5
indicator("Non-Lagging Indicator: EMA + TSI", overlay=true)
// Parameters for the EMA
fastLength = input.int(9, title="Fast EMA Period", minval=1)
slowLength = input.int(21, title="Slow EMA Period", minval=1)
// Parameters for the TSI
tsiFastLength = input.int(13, title="TSI Fast Length", minval=1)
tsiSlowLength = input.int(25, title="TSI Slow Length", minval=1)
tsiSignalLength = input.int(7, title="TSI Signal Length", minval=1)
// EMA Calculation
fastEMA = ta.ema(close, fastLength)
slowEMA = ta.ema(close, slowLength)
// TSI Calculation
delta = close - close[1]
doubleSmoothDelta = ta.ema(ta.ema(delta, tsiFastLength), tsiSlowLength)
doubleSmoothAbsDelta = ta.ema(ta.ema(math.abs(delta), tsiFastLength), tsiSlowLength)
tsi = 100 * doubleSmoothDelta / doubleSmoothAbsDelta
tsiSignal = ta.ema(tsi, tsiSignalLength)
// Plot EMAs
plot(fastEMA, color=color.blue, title="Fast EMA")
plot(slowEMA, color=color.orange, title="Slow EMA")
// Plot TSI and Signal
plot(tsi, color=color.green, title="True Strength Indicator")
plot(tsiSignal, color=color.red, title="TSI Signal")
// Buy and Sell Conditions
buyCondition = ta.crossover(fastEMA, slowEMA) and ta.crossover(tsi, tsiSignal)
sellCondition = ta.crossunder(fastEMA, slowEMA) and ta.crossunder(tsi, tsiSignal)
// Plot Buy and Sell Signals
plotshape(buyCondition, color=color.green, style=shape.labelup, location=location.belowbar, text="BUY")
plotshape(sellCondition, color=color.red, style=shape.labeldown, location=location.abovebar, text="SELL")
Bands and Channels
Candlestick analysis
Chart patterns
开源脚本
本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受
网站规则
约束。 您可以收藏它以在图表上使用。
想在图表上使用此脚本?
添加到收藏
uttamparamanik50
关注
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在
使用条款
阅读更多信息。