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)