Closed August1328 closed 2 years ago
@August1328 Hi, thank you for using our library.
I guess you are passing just a list form of dataframe, but the library has its own Quote class. You have to pass the Iterable(ex. list) of Quote
instances.
This comment may be helpful to you:
Thanks, I missed this comment due to the different subject.
The calculation works fine now.
Good to hear that! If you have further questions, please let us know anytime :)
[!TIP] For a working example using price quotes from a pandas.DataFrame, see our Replit of the Williams Fractal indicator. If you're having general trouble getting setup, see our QuickStart guide.
See also:
I use another python TA module and wanted to compare it with this module, but I am already having problems at the beginning.
I can download historical quotes from IBKR into a dataframe "hist_quotes". The df looks like this:
The quotes parameter has be of type "Iterable[Quote]", so I converted the df to a list:
quotes = hist_quotes.values.tolist()
and then call the indicator
results = indicators.get_kvo(quotes, 34,55,13)
which breaks off with an error:
The content of "quotes" looks like this and it is iterable:
I read every post available on this topic on stackoverflow and also tried different ways to create the quotes -- df.to_records(), df.to_dict(), iter(), ... but everything failed.
So, I am a little stuck... I guess the solution is rather simple, could someone show please help me with the right way? What am I missing?