[Python+Backtrader] Krasser Fehler in Backtrader: 'Plot_OldSync' object has no attribute 'mpyplot'

in #deutsch3 years ago (edited)

Es ist immer wieder erstaunlich wie viele Fehler in Opensource-Software sind.

Und zwar geht es im die Tradingsoftware Backtrader.

Backtrader funktioniert auf meinem Linux-Rechner nicht, es kommt folgende Fehlermeldung:

AttributeError: 'Plot_OldSync' object has no attribute 'mpyplot'

image.png

rfig = cerebro.plot(volume=False, start=best_start_datetime, end=best_end_date, savefig=True, figfilename='backtrader-plot.png', stdstats=False, preload=True)

backtrader==1.9.76.123
matplotlib==3.4.2
backtrader==1.9.76.123
matplotlib==3.3.4

Eine Ursache für diesen Fehler ist ein falsches Datum, also wenn die Quelle nicht das Datum enthält, daß Du Verarbeiten möchtest.

Sort:  

Wie viel abugs haben komerzielle Software? Und da wunderst dich bei einem Opensource, das da bugs bei sind? Da können gebau so gut welche vorhanden sein, grade weil dann nicht zwangsweise auf unterschiedlichen Geräten getestet wird.

Was ist denn Backtrader?

Backtrader ist eine System zum - hautpsächlich backtesting - von Indikatoren und Strategien. Ich benutze es um einen Tradingbot zu entwickeln.

Danke für die Aufklärung

Der Fehler tritt auch auf, wenn man einen eigenen Plotter verwendet:

from backtrader import plot
plotter = plot.Plot(style='candlestick', iplot=False)
cerebro.plot(plotter=plotter, dpi=900)

Congratulations @fehlerbeheber! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 10 upvotes.
Your next target is to reach 50 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Hive Tour Update - Decentralized blacklists and Mutes lists
Support the HiveBuzz project. Vote for our proposal!

Hello, @fehlerbeheber ! This is @macchiata from the @OCD team. We saw that you already posted your first post here in Hive!

Welcome to Hive ! it would be awesome if you do an introduction post. You can refer to this intro post for reference:

My Introduction to the Hive Community

Also check out STEM SOCIAL

Improving how STEM discipline are communicated across the web, one blog post at a time.
https://peakd.com/c/hive-196387/created

There's no specific format on how you do your intro post, but there are some suggested content that we would love to see in your post. Information like who are you and where you're from, how did you discover Hive or who invited you, what types of content you want to see here and the types that you want produce, and what are your expectations in this platform.

There's no pressure on this. You can choose on whatever information you would like to share.

If you have questions, you can hop into OCD's Discord server and we'll gladly answer your questions. For now, @lovesniper will follow you and we are looking forward to your intro post!