I am trying to setup a Strategy that operates each day with no historical data from prior days. I do back-tests and it is clear it is using the previous days bars to calculate the VMA. For example, I am using the following:
VMA(period, volatilityPeriod)
I would like it to reset the bars as if it was the 1st day each day. I don't exactly know how to do that easily. I have considered something more along the lines of this to implement the concept:
VMA(Math.Min(period,Bars.BarsSinceSession), Math.Min(volatilityPeriod,Bars.BarsSinceSession))
This would be a lot of work to change through-out the code and I don't think the VMA Indicator overlayed on the graph will reflect this re-calculation. Is there an easy way to do this for a strategy, is this only a side-affect of backtesting?
Thanks

Comment