Trendoscope

Just Another RSI

This is slightly different implementation of RSI using arrays. But, it also comes with a twist.

Formula for standard RSI can be found here: www.investopedia.com/terms/r/rsi.asp


If there is green candle, gain for the candle is equal to price movement from previous bar and loss for that candle is 0. Similarly in case of red candle, loss is considered to be movement from previous candle whereas gain is 0. Also, as mentioned in step2, on each bar, average of previous bar gains/losses are merged with present candle gain/loss.

New Process
  • Gain is considered only on green candles. Hence, there is no zero gain candles
  • Loss is considered only on red candles. Hence, there is no zero loss candles
  • Average or median of last N gains and losses are considered. Hence, the movement mainly tell us the strength between bullish and bearish candles.
  • Let us forget about seeing it as overbought and oversold area and look at it as bullish and bearish region.

How it is different
Since, gain and loss are only considered if there are gain and loss, this index represents the strength between bullish and bearish candles without looking at price movement. Hence, the index has capability to go in opposite direction of the price representing price movement is not supported by strength.

Another advantage of this implementation is it allows using variable length for the method. In case of RSI, length has to be constant. It cannot be variable which can change every bar. But, we do not have that constraint in this implementation due to use of arrays.

At present, this is purely experimental. I will look forward to study this more with respect to divergence and for use in trend following methods.

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 đồ?