Hi Phil , we are talking about it. It’s not as simple as it sounds. The solution has to work for different series (bars, weekly, weekday) and be intuitive.
There are two main routes:
- Use a starting offset to -1 instead of 0.
- Add an offset parameter so that you decide.
Route 1 is more intuitive but has challenges for weekly time series (weekly series do not have access to Monday’s close). Route 2 is the most flexible but harder to use. And both this solutions will cause different results for whoever is using Future function. But that’s probably preferable since it’s more correct and usage is still light.
Yes this is a problem with bars and short periods. You should use Close_D(-6)/Close_D(-1) . This will always be Monday to Monday (when Monday is a holiday Close_D(-1) will return Tuesday’s close).
So until we have a fix for the future functions try using Close_D. This should work as expected for you.
Thanks