Thanks jcl,
That helps but I'm still a little confused on terminology.
1) Average price to me from other platforms implied:
(high+low+open+close)/4
while (high+low)/2 was something I'd previously called a mid price.
Can this be clarified in the manual?
2) For backtesting when we use price() and our price data is the provided 1 minute tick structs with a HLOC, on barperiod = 1 then price() returns (high+low)/2 which is in my mind a mid price? Is this correct?
3) What happens when there is a gap i.e. no tick struct for a minute or minutes available at all?
Does zorro execute run() for a bar with no tick structs?
What does zorro plot? a gap?
What does zorro return when asked for price() for a specific minute it does not have a tick struct for, does it return null, an error or simply price() for the previous or next available tick struct?
How do indicators react to these gaps?
4) Still in backtesting, if barperiod is higher than 1 e.g. 5, then can you confirm that price() returns an average of the 5 x 1 min tick structs i.e.
((Min 1 :(high+low)/2) + (Min 2 :(high+low)/2) .... + (Min 5 :(high+low)/2))/5
This to me is close to a true average and provides superior smoothing to previous definitions of average such as (high+low+open+close)/4.
Can you also confirm that if that 5 min period in time contains more or less than five tick structs then the denominator is the actual number of tick structs available for that 5 minute period and the numerator is the sum of the midpoints (high+low)/2) for those tick structs?
5) In live trading, can I assume that the ticks received by zorro are single close prices i.e. there is no High Low or Open, so (high+low)/2) is actually close, therefore even at Barperiod = 1 in live trading price() returns a true average of all ticks received in that minute?
6) Does zorro then store each tick received as a tick struct back to the bar file? or does it store that minute's data summarised as a single HLOC in the Bar file?
7) What does zorro return for price() for a period in live trading where no ticks are received?
Thanks again for any help you can give.