I wish to set some values - of a strategy - based on values from last day or hour.
It makes good sense to do for values that i use in the script in the OnBarUpdate - but if i want to set/change the actual series - so lest say that all is calculated on 5 minutes bars instead of 1 minut bars - how can i do that? Or 500 ticks instead of 200?
I imagine that before i "run" the OnBarUpdate() - i need to somehow calculate whatever value i need from yesterday or last hour bar - and then set AddDataSeries(Data.BarsPeriodType.Tick, 1) or minutes etc.
So i also guess that my question is - how do i define - any vlaue from a "bar" from the day ago - or hour ago - before having defined the data timeseries?
Hope anyone can help
Thanks.
Comment