Open ivannp opened 8 years ago
It is forward-looking. But it's better than the prior setting, which was always 0.01. That didn't work well for data that tended to have smaller changes (e.g. foreign exchange). I'm open to alternatives.
It seems stockcharts.com use something like previous day low. That seems reasonable. One can always throw away a few days and use the computed sd. A third one is to do some magic using HLC from one day to come up with some sd approximation.
I was looking at the code just as a reference while implementing something similar. Otherwise I might have coded one of the above alternatives.
I was wondering about the same "issue" and dumb enough to overlook the ahead looking in the code.
http://stackoverflow.com/questions/37745430/r-parabolic-sar-and-look-ahead-bias/
If I am reading the code correctly, it's sd over the Hi - Lo series. That's forward looking in a way.