#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Heikin-Ashi Smoothed

# Technical Studies Reference

- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)

### Heikin-Ashi Smoothed

The Heikin-Ashi Smoothed study is based upon the standard Heikin-Ashi study with additional moving average calculations. We describe these calculations below.

Let \(O\), \(H\), \(L\), and \(C\) be random variables denoting the Open, High, Low, and Close Prices, respectively, and let their respective values at Index \(t\) be \(O_t\), \(H_t\), \(L_t\), and \(C_t\). Let the Inputs **Moving Average Period Type 1** and **Moving Average Period Type 2** be denoted as \(n_1\) and \(n_2\), respectively.

We begin by smoothing the Price Data with Smoothed Moving Averages. We indicate the smoothed Price Data with a superscript \((S)\), and we compute them as follows.

\(O_t^{(S)}(n_1) = SMMA_t(O,n_1)\)\(H_t^{(S)}(n_1) = SMMA_t(H,n_1)\)

\(L_t^{(S)}(n_1) = SMMA_t(L,n_1)\)

\(C_t^{(S)}(n_1) = SMMA_t(C,n_1)\)

**Note**: Depending on the setting of the Input **Moving Average Type 1**, the Smoothed Moving Averages in the above formulas could be replaced with Exponential Moving Averages, Linear Regression Moving Averages, Simple Moving Averages, Weighted Moving Averages, Wilders Moving Averages, or Simple Moving Averages - Skip Zeros.

Next we apply the Heikin-Ashi transformation to the smoothed Price Data. We denote the Heikin-Ashi smoothed Price Data with a superscript \((HAS)\), and we compute them as follows.

\(\displaystyle{O_t^{(HAS)}(n_1) = \left\{ \begin{matrix} O_0^{(S)}(n_1) & t = 0 \\ \frac{O_{t - 1}^{(HAS)}(n_1) + C_{t - 1}^{(HAS)}(n_1)}{2} & t > 0 \end{matrix}\right .}\)\(\displaystyle{H_t^{(HAS)}(n_1) = \max\left\{H_t^{(S)}(n_1), O_t^{(HAS)}(n_1)\right\}}\)

\(\displaystyle{L_t^{(HAS)}(n_1) = \min\left\{L_t^{(S)}(n_1), O_t^{(HAS)}(n_1)\right\}}\)

\(\displaystyle{C_t^{(HAS)}(n_1) = \frac{O_t^{(S)}(n_1) + H_t^{(S)}(n_1) + L_t^{(S)}(n_1) + C_t^{(S)}(n_1)}{4}}\)

Finally, we apply a second smoothing with Weighted Moving Averages. We denote the double-smoothed Heikin-Ashi Price Data with a superscript \((HA2S)\), and we compute them as follows.

\(O_t^{(HA2S)}(n_1,n_2) = WMA_t\left(O_t^{(HAS)}(n_1),n_2\right)\)\(H_t^{(HA2S)}(n_1,n_2) = WMA_t\left(H_t^{(HAS)}(n_1),n_2\right)\)

\(L_t^{(HA2S)}(n_1,n_2) = WMA_t\left(L_t^{(HAS)}(n_1),n_2\right)\)

\(C_t^{(HA2S)}(n_1,n_2) = WMA_t\left(C_t^{(HAS)}(n_1),n_2\right)\)

The one exception to these formulas occurs when the **Set Close to Current Price for Last Bar** Input is set to Yes. In that case, for the last bar in the chart, we have \(C_t^{(HA2S)}(n_1,n_2) = C_t\).

**Note**: Depending on the setting of the Input **Moving Average Type 2**, the Weighted Moving Averages in the above formulas could be replaced with Exponential Moving Averages, Linear Regression Moving Averages, Simple Moving Averages, Wilders Moving Averages, Simple Moving Averages - Skip Zeros, or Smoothed Moving Averages.

If you want to view the **Heikin-Ashi Smoothed** study as the main price graph and replace the existing chart bars, then open the Study Settings window for the Heikin-Ashi study and enable the **Display As Main Price Graph** option.

#### Inputs

- Moving Average Type 1
- Moving Average Period 1
- Moving Average Type 2
- Moving Average Period 2
**Set Close to Current Price for Last Bar**: If this Input is set to**Yes**, the last/close price of the last Heikin-Ashi bar is set to the current last trade price in the chart. Otherwise, the last/close price on the last Heikin-Ashi bar is a calculated value and does not represent the true current last trade price.

#### Spreadsheet

The spreadsheet below contains the formulas for this study in Spreadsheet format. For simplicity, the test was conducted with both Moving Average Types set to Simple Moving Average. Save this Spreadsheet to the Data Files Folder.

Open it through **File >> Open Spreadsheet**.

*Last modified Friday, 14th June, 2019.