Doji (Preview)
get_doji(quotes, max_price_change_percent=0.1)
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? |
max_price_change_percent |
float, default 0.1 | Optional. Maximum absolute percent difference in open and close price. Example: 0.3% would be entered as 0.3 (not 0.003). Must be between 0 and 0.5 percent, if specified. |
Historical quotes requirements
You must have at least one historical quote; 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
CandleResults[CandleResult]
- This method returns a time series of all available indicator values for the
quotes
provided. -
CandleResults
is just a list ofCandleResult
. - 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 candlestick pattern is indicated on dates where
match
isMatch.NEUTRAL
. -
price
isclose
price; however, all OHLC elements are included in thecandle
properties. - There is no intrinsic basis or confirmation Match provided for this pattern.
CandleResult
name | type | notes |
---|---|---|
date |
datetime | Date |
price |
decimal, Optional | Price of the most relevant OHLC candle element when a match is present |
match |
Match | Generated Match type |
candle |
CandleProperties | Candle properties |
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_history_from_feed("SPY")
# Calculate
results = indicators.get_doji(quotes);
About Doji (Preview)
Doji is a single candlestick pattern where open and close price are virtually identical, representing market indecision.
[Discuss]