Heikin-Ashi
get_heikin_ashi(quotes)
Parameters
name | type | notes |
---|---|---|
quotes |
Iterable[Quote] | Iterable(such as list or an object having __iter__() ) of the Quote class or its sub-class. • Need help 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.
- The first period will have
None
values since there’s not enough data to calculate.
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
-
.to_quotes()[deprecated]
- .find(lookup_date)
- .remove_warmup_periods(qty)
See Utilities and Helpers for more information.
Example
from stock_indicators import indicators
# This method is NOT a part of the library.
quotes = get_history_from_feed("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]