HPotter

Accumulation Swing Index (ASI)

The Accumulation Swing Index is a cumulative total of the Swing Index.
The Accumulation Swing Index was developed by Welles Wilder.
The SwingIndex function was developed to help cut through the maze of
Open, High, Low and Close prices to indicate the real strength and direction
of the market. The Swing Index function looks at the Open, High, Low and
Close values for a two-bar period. The theory is that there are four cross-bar
and one intra-bar comparisons that are strong indicators of an up or down day.
The Swing Index returns a number between -100 and 100. If the factors point toward
an up day, then the function value will be positive and vice versa. In this way,
the Swing Index gives us definite short-term swing points, and it can be used to
supplement other methods as a breakout indicator. A breakout is indicated when the
value of the Accumulation Swing Index (ASI) exceeds the ASI value on the day when a
previous significant High Swing Point was made. A downside breakout is indicated when
the value of the ASI drops below the ASI value on a day when a previous significant
low swing point was made.
Since only futures have a relative daily limit value, this function only makes sense
when applied to a futures contract. If you use this function and it only plots a zero
flat line, check the Daily Limit value.

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 26/05/2014
// The Accumulation Swing Index is a cumulative total of the Swing Index. 
// The Accumulation Swing Index was developed by Welles Wilder.
// The SwingIndex function was developed to help cut through the maze of 
// Open, High, Low and Close prices to indicate the real strength and direction 
// of the market. The Swing Index function looks at the Open, High, Low and 
// Close values for a two-bar period. The theory is that there are four cross-bar 
// and one intra-bar comparisons that are strong indicators of an up or down day.
// The Swing Index returns a number between -100 and 100. If the factors point toward 
// an up day, then the function value will be positive and vice versa. In this way, 
// the Swing Index gives us definite short-term swing points, and it can be used to 
// supplement other methods as a breakout indicator. A breakout is indicated when the 
// value of the Accumulation Swing Index (ASI) exceeds the ASI value on the day when a 
// previous significant High Swing Point was made. A downside breakout is indicated when 
// the value of the ASI drops below the ASI value on a day when a previous significant 
// low swing point was made.
// Since only futures have a relative daily limit value, this function only makes sense 
// when applied to a futures contract. If you use this function and it only plots a zero 
// flat line, check the Daily Limit value. 
////////////////////////////////////////////////////////////
study(title="Accumulation Swing Index (ASI)", shorttitle="ASI")
DailyLimit = input(10000, minval=1)
AbsHighClose = abs(high - close[1])
AbsLowClose = abs(low - close[1])
AbsCloseOpen = abs(close[1] - open[1])
K = iff(AbsHighClose >= AbsLowClose, AbsHighClose, AbsLowClose)
R = iff(AbsHighClose >= AbsLowClose, 
        iff(AbsHighClose >= (high - low), AbsHighClose - 0.5 * AbsLowClose + 0.25 * AbsCloseOpen, (high - low) + 0.25 * AbsCloseOpen),
        iff(AbsLowClose >= (high - low),  AbsLowClose - 0.5 * AbsHighClose + 0.25 * AbsCloseOpen, (high - low) + 0.25 * AbsCloseOpen))
nRes = iff(R != 0, 
            (50 * (((close - close[1]) + 0.50 * (close - open) + 0.25 * (close[1] - open[1])) / R ) * K / DailyLimit) + nz(nRes[1], 0), 
            0 + nz(nRes[1], 0))
plot(nRes, color=blue, title="ASI")