HPotter

RSI based on ROC

This is the new-age indicator which is version of RSI calculated upon
the Rate-of-change indicator.
The name "Relative Strength Index" is slightly misleading as the RSI
does not compare the relative strength of two securities, but rather
the internal strength of a single security. A more appropriate name
might be "Internal Strength Index." Relative strength charts that compare
two market indices, which are often referred to as Comparative Relative Strength.
And in its turn, the Rate-of-Change ("ROC") indicator displays the difference
between the current price and the price x-time periods ago. The difference can
be displayed in either points or as a percentage. The Momentum indicator displays
the same information, but expresses it as a ratio.

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 14/05/2014
// This is the new-age indicator which is version of RSI calculated upon 
// the Rate-of-change indicator.
// The name "Relative Strength Index" is slightly misleading as the RSI 
// does not compare the relative strength of two securities, but rather 
// the internal strength of a single security. A more appropriate name 
// might be "Internal Strength Index." Relative strength charts that compare 
// two market indices, which are often referred to as Comparative Relative Strength.
// And in its turn, the Rate-of-Change ("ROC") indicator displays the difference 
// between the current price and the price x-time periods ago. The difference can 
// be displayed in either points or as a percentage. The Momentum indicator displays 
// the same information, but expresses it as a ratio.
////////////////////////////////////////////////////////////
study(title="RSI based on ROC", shorttitle="RSI/ROC")
RSILength = input(20, minval=1)
ROCLength = input(20, minval=1)
xPrice = close
hline(70, color=red, linestyle=line, title = "Upper")
hline(30, color=green, linestyle=line, title = "Lower")
nRes = rsi(roc(xPrice,ROCLength),RSILength)
plot(nRes, color=blue, title="RSI/ROC")