Thisindicatoris 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)。

打开网易新闻 查看更多图片

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;

打开网易新闻 查看更多图片

如何使用

  1. 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.
  2. 零线交叉。如果 SPY/SPX500 穿越零线,那么它是看涨的。如果紫色的 VIX 线向上穿越,要小心,因为这通常是看跌的信号。
  3. white/blue/red lines cross purple (Vix). If they cross upwards, this is bullish. If downward, this is bearish. Basically, SPX, ES1!, SPY or even DIA can be used. The security and the Vix should travel in opposite directions and cross the zero-line at the same time. But this is not always the case.
  4. 白/蓝/红线条与紫色(VIX)线交叉。如果它们向上交叉,这是看涨的。如果向下交叉,这是看跌的。基本上 SPX、ES1!、SPY 甚至 DIA 都可以使用。证券和 VIX 应该朝相反方向移动并且同时穿越零线。但这并不总是这样。
  5. Black area infills. These are used between the close and the highs (blue) and the lows(red). Close should not be between these in order to have momentum.
  6. 黑色填充区域。这些用于收盘价和最高价(蓝色)之间以及最低价(红色)之间。为了保持动力,收盘价不应该位于这些区域之间。
  7. Close (white line) leads. Close is the last price so it tends to show where the others (highs and lows) are going. If the close is sagging below a high where the blue lines are on top, this could mean that there is a reversal coming. Same holds true for a white line above a "valley" formed by the blue and red lines; it could mean a reversal to the upside soon.
  8. 收盘价(白色线)领先。收盘价是最后的价格,因此它倾向于显示其他价格(最高价和最低价)的走势。如果收盘价低于蓝色线所在的高点,并且蓝色线位于顶部,这可能意味着即将到来的反转。对于白色线位于由蓝色和红线形成的“山谷”之上的情况也是如此;这可能意味着不久将有向上反转。
  9. The Black Infill areas as a squeeze or contraction/expansion area. The thinner the black infill areas, the more of a momentum "squeeze" could be present. Wide black infill areas mean increased volatility and what may come next is a reversion to the mean for volatility. See TTM Squeeze Indicator or the Squeeze Momentum Indicator (kudos LazyBear).
  10. 黑色填充区域作为挤压或收缩/扩张区域。黑色填充区域越薄,越可能出现动力“挤压”。黑色填充区域越宽,意味着波动性增加,接下来可能出现的是对波动性均值的回归。参见 TTM 挤压指标或挤压动力指标(感谢 LazyBear)。

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

打开网易新闻 查看更多图片