How to avoid plotting of strategy data
-
Hi,
please, is it possible to use some data in the strategy (e.g. resampled data) but not to plot them? I would like to keep my plot as simple as possible, especially when I use many input data.
Thanks -
A data feed is handled like other objects and supports the
plotinfo
scheme to control plotting (with the attributeplot
which is a boolean with default valueTrue
for data feeds)See here Docs - Plotting
This blog post shows it in action, because only plotting of the observers was wished Blog - BTFD
-
Aha, I see:
data = YahooData(dataname=args.data, plot=False, **kwargs)Thanks a lot
-
Like with other objects, you an also create it and then do (may seem cleaner in many cases)
data = bt.feeds.MyChosenFeed(dataname=..., someparam=xxx, anotherparam=yyyy) data.plotinfo.plot = False
Passing
plot=False
works (as explained in the documentation), because anykwarg
not recognized as a parameter for the object, will then be matched, if possible, to theplotinfo
attributes. -
What if I want to plot the indicator (based on resampled data) on the original chart but I don't want to plot the chart for resampled data, is this possible? I am not able to achieve this.
-
Look for the
plotmaster
option in Docs - Plotting -
Thanks! It was my mistake.