Rob_Rawks

Accumulation Swing Index

Per Investopedia: The ASI is used to gage the long-term trend by comparing bars which contain its opening, closing, high and low prices throughout a period of time. It is a trend finding/confirming tool.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//Accumulative Swing Index
//By Rob Pecoraro
//Feel free to use it! 
//If you change it, improve it or alter it, just give me props in a comment!

study("ASI", overlay=false)

a = high - close[1]
b = low - close[1]
c = high - low

L = input(30000, minval=1)

K = max((high[1]-close), (low[1]-close))

TR1 = max(a, b)
TR2 = c
TR = iff(TR1>TR2, TR1, TR2)

ER = iff(a > b, (high-close[1])-.5*(low-close[1])+.25*(close-open[1]), iff(b > c, (low-close[1])-.5*(high-close[1])+.25*(close[1]-open[1]),(high-low)+.25*(close[1]-open[1])))

SH = close[1]-open[1]

R = TR-.5*ER+.25*SH

si = 50*(((close-close[1])+.5*(close-open)+.25*(close[1]-open[1]))/R)*(K/L)

asi = si[1]+si

plot(asi, "Fast",black, 2)