Under the daily ("Build Algorithm") backtest, data[stock].mavg(1) will simply return the current daily closing price of the stock, correct? And data[stock].mavg(3) will return the average of the current daily closing price and the closing prices of the previous two trading days, correct?

Under the full backtest, how is mavg(days) computed? As a specific example, for data[stock].mavg(3) at 10 am on current day 0, does the moving average include minutely data from day 0, day -1, and day -2 (where the negative days are previous trading days)? Or does it only use minutely data from day -1, day -2, and day -3? Or is the calculation based on daily closing prices only, even under the full backtest?

The number of days corresponds to the number of days inside the window (so day 0, -1, and -2). It's gonna be computed over the data frequency of the events, so if it's minute it's gonna be 3 days of minute data.

Does the average include minutely ticks from the first part of day 0 (up to 10 am), all of day -1, all of day -2, and part of day -3 (after 10 am)?

Or does the average only include minutely ticks from all of days -1, -2, & -3 (excluding any ticks from day 0)?

In other words, is mavg(days) a moving average of ticks, over the trailing N*days ticks, where N is the number of ticks in a day? Or does the average ignore ticks if they are in the current day of the backtest?

Also, for mavg(days), does days need to be an integer? Or can days be fractional (e.g. mavg(1.5))?

So to put it another way... there are 390 trading minutes in a day (or there should be, but we'll ignore that possibility for now)

The first minute is normally at 9.31 EST, referring to the previous 60 seconds worth of data. The last minute of a day is at 16.00 EST.

At 10am on day 0, this is minute number 30. calling mavg(3) should include the following minute data:
day 0: the first 30 minutes
day -1: all 390 minutes
day -2: all 390 minutes
day -3: 360 minutes, missing the first 30 minutes of that day.

so the number of minutes included in the calculation should be 390*3 = 1170

I agree with James (if I'm understanding correctly)...seems like a problem for minutely trading. The trailing window should look back the same number of minutes, regardless of the time of day, right? Otherwise, it appears that the window size will grow over a given trading day, finally reaching a true 3 day window at the end of the day, correct?