peerchemist / finta

Common financial technical indicators implemented in Pandas.
GNU Lesser General Public License v3.0
2.13k stars 688 forks source link

Suggestion, BBands MA argument should be enforced to be a supported type (Series or None) #133

Open fredrik-corneliusson opened 2 years ago

fredrik-corneliusson commented 2 years ago

BBands MA argument is silently ignored if it is not a pd.Series. As the fool that I am I gave an integer as MA argument instead of a pd.Series and did not notice my mistake immediately. What I expected: If it is not a supported type an error should be raised or a warning should be printed. Example:

from finta import TA
# MA argument is not correct type and will be ignored
bbands = TA.BBANDS(df, 20, MA=50)

This was in Fintra 1.3

Thanks for a fantastic library!