Introduction - If you have any usage issues, please Google them yourself
The indicator will be generated by R’s lag() function. The signal will be to go long(short) if the price is higher(lower) than it was a year ago. In order to equalize risk across instruments, we are going to size our order with a lagging ten day ATR (that is, we use yesterday’s ATR to place our order sizes), and we will risk around 2 percent per trade. ATR stands for Average True Range and is
an indicator that can be found in the TTR package.