Okay. So is there way to achieve above?

As an example, is it possible to calculate the SMA of the last 5 day highs?

The issue is that I want to use only the high that occurred between StartMarket and EndMarket.

I first thought I could use dayHigh but this did not work.

I'd highly appreciate if you could shed some light on this as I got stuck.