李津大局观:【外国指标翻译】动量因子ATR—真实强度指标True Strength

Connor 火必app官网下载 2024-08-22 21 0

This indicator is a True Strength Indicator with Close, High and Low used together, along with the TSI of the Vix.The white line is the close.

HLC 真实强度指标结合 VIX 线由 SpreadEagle71 编写,这个指标是一个结合了收盘价、最高价和最低价的真实强度指标(True Strength Indicator)。

李津大局观:【外国指标翻译】动量因子ATR—真实强度指标True Strength

Pure语言代码

indicator("HLC True Strength Indicator (with Vix)", shorttitle="HLC TSI", format=format.price, precision=4, timeframe="", timeframe_gaps=true)

long = input(title="Long Length", defval=15)

short = input(title="Short Length", defval=5)

signal = input(title="Signal Length", defval=5)

price = close

double_smooth(src, long, short) =>

fist_smooth = ta.vwma(src, long)

ta.vwma(fist_smooth, short)

pc = ta.change(price)

double_smoothed_pc = double_smooth(pc, long, short)

double_smoothed_abs_pc = double_smooth(math.abs(pc), long, short)

tsi_value = 99 * (double_smoothed_pc / double_smoothed_abs_pc)

plot(tsi_value, color=#FFFFFF, linewidth=2)

hline(0, title="Zero", color=#787B86)

priceh = high

pch = ta.change(priceh)

double_smoothed_pch = double_smooth(pch, long, short)

double_smoothed_abs_pch = double_smooth(math.abs(pch), long, short)

tsi_valueh = 99 * (double_smoothed_pch / double_smoothed_abs_pch)

h1 = plot(tsi_valueh, color=#0000FF,linewidth=2)

pricel = low

pcl = ta.change(pricel)

double_smoothed_pcl = double_smooth(pcl, long, short)

double_smoothed_abs_pcl = double_smooth(math.abs(pcl), long, short)

tsi_valuel = 99 * (double_smoothed_pcl / double_smoothed_abs_pcl)

l1= plot(tsi_valuel, color=#FF0000,linewidth=2)

vix = request.security('VIX',timeframe.period,close)

pcv = ta.change(vix)

double_smoothed_pcv = double_smooth(pcv, long, short)

double_smoothed_abs_pcv = double_smooth(math.abs(pcv), long, short)

tsi_valuev = 99 * (double_smoothed_pcv / double_smoothed_abs_pcv)

plot(tsi_valuev, color=#800080,linewidth=2)

通达信代码

复制黏贴以下代码到通达信,即可使用,主打一个简洁明了大道至简

{计算TSI值}

李津1:99*(WMA(WMA((LN(CLOSE)-LN(REF(CLOSE,1))),5),15)

/WMA(WMA(ABS(LN(CLOSE)-LN(REF(CLOSE,1))),5),15)),LINETHICK2;

李津2:99*(WMA(WMA((LN(HIGH)-LN(REF(HIGH,1))),5),15)

/WMA(WMA(ABS(LN(HIGH)-LN(REF(HIGH,1))),5),15)),COLORBLUE,LINETHICK2;

李津3:99*(WMA(WMA((LN(LOW)-LN(REF(LOW,1))),5),15)

/WMA(WMA(ABS(LN(LOW)-LN(REF(LOW,1))),5),15)),COLORRED,LINETHICK2;

如何使用

李津大局观:【外国指标翻译】动量因子ATR—真实强度指标True Strength

Zero line crosses. If SPY/SPX500 crosses the zero line, then its bullish. If the purple Vix line crosses up, watch out because this is bearish.

展开全文

Lastly, just remember indicators indicate; they are not magic. :)最后,只需记住,指标只是魔法。:)

李津大局观:【外国指标翻译】动量因子ATR—真实强度指标True Strength

评论