# Technical Studies Reference

### Adaptive RSI Moving Average with Smoothing

This study calculates and displays an adaptive moving average of the Relative Strength Index (RSI), which in turn is a function of the data specified by the Input Data. The study allows for optional smoothing of both the Input Data and the RSI.

Smoothed vs Unsmoothed Input Data

Let $$X$$ be a random variable denoting the Input Data, and let $$X_t$$ be the value of the Input Data at chart bar $$t$$. If the value of the Set Price Smoothing Input is No, then the unsmoothed Input Data $$X$$ is used in the subsequent calculations. If the value is Yes, then the smoothed Input Data is used instead. The smoothing is done with an Exponential Moving Average whose Length is given by the Price Smoothing Period Input, denoted as $$n_{PS}$$.

We define a new random variable $$P(X,n_{PS})$$ denoting the Price (smoothed or unsmoothed). The value of this Price at Index $$t$$ is given as follows.

$$P_t(X,n_{PS}) =\left\{ \begin{matrix} X_t & Price \space Smoothing = No \\ EMA_t\left(X,n_{PS}\right) & Price \space Smoothing = Yes \end{matrix}\right .$$

Note: Depending on the setting of the Input Price Smoothing Average Type, the Exponential Moving Average in the calculation of the smoothed Input Data could be replaced with a Linear Regression Moving Average, a Simple Moving Average, a Weighted Moving Average, a Wilders Moving Average, a Simple Moving Average - Skip Zeros, or a Smoothed Moving Average.

Smoothed vs Unsmoothed RSI

The RSI is calculated for $$P(X,n_{PS})$$ with Length given by the ARSI Period, denoted as $$n_{ARSI}$$. The type of Moving Average used in the calculation of the RSI is determined by the ARSI Moving Average Type Input. If the value of the Set RSI Smoothing Input is No, then the RSI at Index $$t$$ is given by $$RSI_t\left(P(X,n_{PS}),n_{ARSI}\right)$$. If the value is Yes, then the smoothed RSI is used instead. The smoothing is done with an Exponential Moving Average whose Length is given by the RSI Smoothing Period Input, denoted as $$n_{RSIS}$$.

We define a new random variable $$R(X,n_{PS},n_{ARSI},n_{RSIS})$$ denoting the RSI (smoothed or unsmoothed). The value of this variable at Index $$t$$ is given as follows.

$$R_t(X,n_{PS},n_{ARSI},n_{RSIS}) =\left\{ \begin{matrix} RSI_t\left(P(X,n_{PS}),n_{ARSI}\right) & RSI \space Smoothing = No \\ EMA_t\left(RSI\left(P(X,n_{PS},n_{ARSI}\right),n_{RSIS}\right) & RSI \space Smoothing = Yes \end{matrix}\right .$$

Note: The calculation of the RSI here differs from that in the RSI study in that $$U(X)$$ and $$D(X)$$ are not calculated until $$t = n_{ARSI}$$.

Note: Depending on the setting of the Input RSI Smoothing Average Type, the Exponential Moving Average in the calculation of the smoothed Input Data could be replaced with a Linear Regression Moving Average, a Simple Moving Average, a Weighted Moving Average, a Wilders Moving Average, a Simple Moving Average - Skip Zeros, or a Smoothed Moving Average.

Scaling Factor

Let $$SF(X,n_{PS},n_{ARSI},n_{RSIS})$$ be a random variable denoting the Scaling Factor, and let $$v$$ denote the ARSI Scale Factor Input. The value of the Scaling Factor at Index $$t$$ as $$SF_t$$ is given as follows.

$$\displaystyle{SF_t(X,n_{PS},n_{ARSI},n_{RSIS},v) = 2v\left|\frac{R_t(X,n_{PS},n_{ARSI},n_{RSIS})}{100} - 0.5\right|}$$

The Adaptive RSI Moving Average at Index $$t$$ for the given Inputs is denoted as $$\overline{RSI}_t(X,n_{PS},n_{ARSI},n_{RSIS},v)$$, and we compute it for $$t \geq n_{ARSI}$$ as follows.

$$\displaystyle{\overline{RSI}_t(X,n_{PS},n_{ARSI},n_{RSIS},v) = \left\{ \begin{matrix} P_t(X,n_{PS}) & t = n_{ARSI} \\ (P(X,n_{PS}) - \overline{RSI}_{t - 1}(X,n_{PS},n_{ARSI},n_{RSIS},v))SF_t(X,n_{PS},n_{ARSI},n_{RSIS},v) + \overline{RSI}_{t - 1}(X,n_{PS},n_{ARSI},n_{RSIS},v) & t > n_{ARSI} \end{matrix}\right .}$$