We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I add signals to my diagram using make_addplot. But if there are no signals in the selected time period, I get an error.
make_addplot
I have solved it for me as follows:
if stock[stock['Signal'].notnull()].shape[0] == 0: print ("- no Signal") else: signal_short = mpf.make_addplot(stock['Signal'] * 0.93, scatter=True, markersize=150, marker='v', color='red' ) add_plots.append(signal_short)
Would it not be an option to integrate this directly into the function and, if necessary, only issue a warning?
if data.notnull()].shape[0] == 0: raise Warning("Empty Dataframe!")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I add signals to my diagram using
make_addplot
. But if there are no signals in the selected time period, I get an error.I have solved it for me as follows:
Would it not be an option to integrate this directly into the function and, if necessary, only issue a warning?
The text was updated successfully, but these errors were encountered: