搜尋
產品
社群
市場
新聞
經紀商
更多
TW
立即開始
社群
/
投資想法
/
Can´t publish the indicator, so copy&paste this on pine editor!
Can´t publish the indicator, so copy&paste this on pine editor!
由MartinMaffei提供
關注
關注
2018年4月23日
2
1
1
2018年4月23日
//
version
=3
study("True Strength Indicator + Moving Average Rate Of Change + Slow Stoch", shorttitle="TSI+MAROC+SlowStoch")
long = input(title="Long Length", type=integer, defval=25)
short = input(title="Short Length", type=integer, defval=13)
signal = input(title="Signal Length", type=integer, defval=13)
price = close
double_smooth(src, long, short) =>
fist_smooth = ema(src, long)
ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
plot(tsi_value / 8, color=#3BB3E4)
plot(ema(tsi_value / 8, signal), color=#FF006E)
hline(0, title="Zero")
// ------------------------------------------------
sma_len = input(21, minval=1, title="SMA len")
roc_len = input(5, minval=1, title="ROC len")
src2 = close
smooth = sma(src2, sma_len)
sma_roc = 100 * (smooth - smooth[roc_len])/smooth[roc_len]
color = sma_roc > sma_roc[roc_len] ? green : red
plot(sma_roc, color=color, title="SMA ROC", style=line)
hline(0)
// ------------------------------------------------
length = input(10, minval=1), smoothK = input(6, minval=1), smoothD = input(3, minval=1)
// Get the real OHLC (useful in not standard chart - like Heikin Ashi)
t = tickerid(syminfo.prefix, ticker)
realO = security(t, period, open)
realH = security(t, period, high)
realL = security(t, period, low)
realC = security(t, period, close)
//palette = realC >= realO ? lime : red
//plotcandle(realO, realH, realL, realC, color=palette)
// Calculation
low_n = lowest(realL, length)
high_n = highest(realH, length)
k = sma(100*((realC-low_n)/(high_n-low_n)), smoothK)
d = sma(k, smoothD)
plot(k/10, color=green)
plot(d/10, color=red)
h0 = hline(7.5)
h1 = hline(2.5)
Technical Indicators
Moving Averages
Oscillators
MartinMaffei
關注
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在
使用條款
閱讀更多資訊。