将技术指标添加到chart.Posn [英] Add Technical Indicator to chart.Posn

查看:121
本文介绍了将技术指标添加到chart.Posn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,我无法将ROC信号添加到吸盘图.在文档中应该允许它.我想用这个指标创建一个新的图表. 有人可以帮忙吗?

For some reason I cannot add a ROC signal to a blotter chart. In the documentation it should be allowed. I want to create a new chart bellow with this indicator. Can someone help?

# plot performance for symbol
chart.Posn(strategy_AbsMom, Symbol = 'SPY', Dates = '1998::',theme=myTheme)
chart.Posn(strategy_AbsMom, Symbol = 'SPY', Dates = '1998::',theme=myTheme,
           TA='addROC(n=lookback,col=4)')

推荐答案

chart.Posn在内部使用chart_Series(不是chartSeries),因此必须使用add_*函数(而不是add*).下面是向chart.Posn图表添加简单移动平均线的示例:

chart.Posn uses chart_Series (not chartSeries) internally, so you have to use add_* functions (not add*). Here's an example of adding a simple moving average to a chart.Posn chart:

require(blotter)
demo(amzn_test, ask=FALSE)
chart.Posn("amzn_port", "amzn", TA='add_SMA(n=5, col=4)')

这篇关于将技术指标添加到chart.Posn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆