Heikin-Ashi
get_heikin_ashi(quotes)
Parameters
name | type | notes |
---|---|---|
quotes | Iterable[Quote] | Iterable of the Quote class or its sub-class. • See here for usage with pandas.DataFrame |
Historical quotes requirements
You must have at least two periods of quotes
to cover the warmup periods; however, more is typically provided since this is a chartable candlestick pattern.
quotes
is an Iterable[Quote]
collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
Return
HeikinAshiResults[HeikinAshiResult]
- This method returns a time series of all available indicator values for the
quotes
provided. HeikinAshiResults
is just a list ofHeikinAshiResult
.- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
HeikinAshiResult
name | type | notes |
---|---|---|
date | datetime | Date |
open | Decimal | Modified open price |
high | Decimal | Modified high price |
low | Decimal | Modified low price |
close | Decimal | Modified close price |
volume | Decimal | Volume (same as quotes ) |
Utilities
See Utilities and Helpers for more information.
Example
from stock_indicators import indicators
# This method is NOT a part of the library.
quotes = get_historical_quotes("SPY")
# calculate
results = indicators.get_heikin_ashi(quotes)
About Heikin-Ashi
Created by Munehisa Homma, Heikin-Ashi is a modified candlestick pattern that uses prior day for smoothing. [Discuss] 💬