PINE LIBRARY

DynamicRSI

By joonheeu
Updated
Library "DynamicRSI"

The "DynamicRSI" library provides a method to calculate a Dynamic Relative Strength Index (RSI) that adjusts its sensitivity based on market volatility. By combining short and long RSI periods with a weighted average influenced by the market's volatility, this library allows users to obtain a more responsive RSI tailored to changing market conditions.

"DynamicRSI" 라이브러리는 시장 변동성에 따라 감도를 조정하는 동적 상대 강도 지수(RSI)를 계산하는 방법을 제공합니다. 짧은 RSI와 긴 RSI 기간을 시장 변동성에 따라 가중 평균하여 결합함으로써, 이 라이브러리는 시장 상황에 맞게 보다 유연하게 반응하는 RSI를 제공합니다.

Function: drsi(src, minLength, maxLength, volatilityPeriod)

함수: drsi(src, minLength, maxLength, volatilityPeriod)

Parameters:

src (float)
  The source data to calculate the RSI (e.g., close price). This is the price data that the RSI is calculated on.
  RSI를 계산하기 위한 입력 데이터입니다(예: 종가(close)). 이 값은 RSI를 계산하는 기준이 되는 가격 데이터입니다.

minLength (simple int)
  The period for the shorter RSI. This parameter controls the sensitivity of the RSI, with a shorter period making the RSI more reactive to price changes.
  짧은 RSI 기간입니다. 이 매개변수는 RSI의 감도를 제어하며, 더 짧은 기간은 RSI가 가격 변화에 더 민감하게 반응하게 합니다.

maxLength (simple int)
  The period for the longer RSI. This parameter provides a smoother RSI, which is less sensitive to short-term price fluctuations.
  긴 RSI 기간입니다. 이 매개변수는 더 부드러운 RSI를 제공하며, 단기적인 가격 변동에 덜 민감하게 반응합니다.

volatilityPeriod (simple int)
  The period used for calculating the Average True Range (ATR) to measure market volatility. This volatility is then used to adjust the weighting between the short and long RSI, making the final Dynamic RSI more adaptive to market conditions.
  시장 변동성을 측정하기 위해 평균 진정 범위(ATR)를 계산하는 기간입니다. 이 변동성을 기반으로 짧은 RSI와 긴 RSI 간의 가중치를 조정하여 최종 Dynamic RSI가 시장 상황에 더 잘 적응할 수 있도록 합니다.

Description:

The drsi function calculates a Dynamic RSI by weighting the short-term and long-term RSI values according to the current market volatility. The function uses the ATR to determine the market's volatility, applying more weight to the short-term RSI when volatility is high and more weight to the long-term RSI when volatility is low. This approach ensures that the RSI is more responsive during volatile periods and smoother during stable periods, providing traders with a more effective tool for identifying overbought and oversold conditions in varying market environments.

drsi 함수는 현재 시장 변동성에 따라 단기와 장기의 RSI 값을 가중치로 조정하여 Dynamic RSI를 계산합니다. 이 함수는 시장의 변동성을 판단하기 위해 ATR을 사용하며, 변동성이 높을 때는 단기 RSI에 더 많은 가중치를 적용하고, 변동성이 낮을 때는 장기 RSI에 더 많은 가중치를 적용합니다. 이 접근 방식은 변동성이 큰 기간 동안 RSI가 더 민감하게 반응하고, 안정적인 기간 동안 더 부드럽게 반응하도록 하여, 다양한 시장 환경에서 과매수 및 과매도 상태를 식별하는 데 보다 효과적인 도구를 제공합니다.
Release Notes
v2

업데이트됨

drsi(src, minLength, maxLength, volatilityPeriod)

@description Calculates a Dynamic RSI by weighting short-term and long-term RSI values based on market volatility.

Parameters:

src (float): The source data to calculate the RSI (e.g., close price). This is the price data that the RSI is calculated on.

minLength (simple int): The period for the short-term RSI, which makes the RSI more reactive to price changes. Shorter periods result in a more sensitive RSI.

maxLength (simple int): The period for the long-term RSI, providing a smoother RSI that is less sensitive to short-term fluctuations. Longer periods result in a less sensitive but more stable RSI.

volatilityPeriod (simple int): The period used for calculating the Average True Range (ATR) to measure market volatility. This volatility measure is then used to adjust the weighting between short and long RSI periods, making the final Dynamic RSI more adaptive to market conditions.

Returns:

(float) Returns the calculated Dynamic RSI value, which is adaptive to current market volatility.

techindicator

Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House rules.

Disclaimer