TTR 패키지를 이용한 Donchian Channel 그리기
- 프로그래밍/R language
- 2020. 9. 29.
TTR 패키지를 이용한 Donchian Channel 그리기
library(xts)
library(quantmod)
library(TTR)
getSymbols("TQQQ")
chartSeries(TQQQ,
type="candlesticks",
subset='2018/',
theme=chartTheme('white'))
dc <-lag(DonchianChannel(TQQQ[,c("TQQQ.High","TQQQ.Low")],n = 8))
plot(addTA(dc$high, on =1, col='red'))
plot(addTA(dc$low, on =1, col='blue'))
'프로그래밍 > R language' 카테고리의 다른 글
XLConnect를 이용해 엑셀파일을 다루는 법 (0) | 2019.06.03 |
---|---|
quantstrat 설치 순서 (0) | 2019.06.03 |
xts: 시계열 데이터에서 특정 시간대만 추출하는 방법 (0) | 2019.06.03 |