Technical Studies Reference
- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)
Heikin-Ashi
The Heikin-Ashi study calculates and displays Heikin-Ashi bars. These are average price bars. By default these bars are displayed in the Chart Region below the main price graph.
If you want to view the Heikin-Ashi study as the main price graph and replace the existing chart bars, open the Study Settings window for the Heikin-Ashi study and enable the Display As Main Price Graph option.
Let \(O\), \(H\), \(L\), and \(C\) be random variables denoting the Opening, High, Low, and Closing Prices, respectively, and let \(O_t\), \(H_t\), \(L_t\), and \(C_t\) be their respective values at Index \(t\). Then we denote the Heikin-Ashi Opening, High, Low, and Closing Prices at Index \(t\) as \(O_t^{(HA)}\), \(H_t^{(HA)}\), \(L_t^{(HA)}\), and \(C_t^{(HA)}\), respectively. These are the Prices that determine the Heikin-Ashi bars, and we compute them for \(t \geq 0\) as follows.
\(O_t^{(HA)} = \displaystyle{\left\{ \begin{matrix} O_t & t = 0 \\ \frac{O_{t - 1}^{(HA)} + C_{t - 1}^{(HA)}}{2} & t > 0 \end{matrix}\right .}\)\(H_t^{(HA)} = \max\left\{H_t,O_t^{(HA)}\right\}\)
\(L_t^{(HA)} = \min\left\{L_t,O_t^{(HA)}\right\}\)
\(C_t^{(HA)} = \displaystyle{\frac{O_t + H_t + L_t + C_t}{4}}\)
Note: If the Set Close to Current Price for Last Bar Input is set to Yes, then \(C_t^{(HA)}\) at the last bar in the chart is set equal to the current Price.
Understand that because all values of a chart bar are modified by the Heikin-Ashi study that the chart bars no longer display real values. You cannot make comparisons of these type of chart bars to another chart which does not have the Heikin-Ashi study. This will also mean that depending upon the chart bar timeframe, that the Close/Last price of the last bar in the chart will be different among charts for the same symbol using this study.
Inputs
- Set Close to Current Price for Last Bar: When this study Input is set to Yes, the default, then the Close/Last price of the last bar in the chart is set to the actual current price of the symbol. This only applies to the very last bar in the chart.
Spreadsheet
The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.
Open it through File >> Open Spreadsheet.
*Last modified Monday, 26th September, 2022.