Indicator as histogram or rectangle boxes instead of line
On 05.04.21 Joshua Ulrich wrote:
getSymbols("SPY")
chart_Series(SPY, subset = "2021")
add_TA(Vo(SPY), type = "h")
It seems that additional params to add_TA are passed to plot. So I can refer to the plot manual. I wasn't aware of that.
You can get better help if you create a minimal reproducible example of your problem.
Generally I'm aware of that. But I was looking for a feature, not
hunting a bug. So I didn't know how I could provide a minimal
reproducible here. But now I have:
getSymbols("SPY")
chart_Series(SPY, subset = "2021")
add_TA(ATR(SPY,10)[,"atr"], type="h") # That's what I was looking for
add_TA(ATR(SPY,10)[,"atr"]) # instead of that
On Mon, Apr 5, 2021 at 10:56 AM Brian G. Peterson <brian at braverock.com> wrote:
plot.xts was based on chart_Series, so adding panels with plot.xts should work. Also, you can absolutely use 'h' plots with add_TA. See e.g. chart.Posn in the blotter package: https://github.com/braverock/blotter/blob/master/R/chart.Posn.R
I will have a look at this. Mike