Reputation: 987
Here's my simplified code:
PlotOrNot = input.bool(true, title="Plot it", inline = "01")
plot(SomethingCalculated, "Calculated Thing", color=color.blue, offset = offset)
As I found here, there's a way to tell the plot
command to do the plot in case the Boolean value is true but I could not manage to make it not turn into error messages.
Upvotes: 0
Views: 5224
Reputation: 21199
Use it in the series
argument of the plot()
.
plot(PlotOrNot ? SomethingCalculated : na, "Calculated Thing", color=color.blue, offset = offset)
Upvotes: 2