The correct syntax is: def Data = Sum( volume(period = AggregationPeriod.WEEK));
As
@halcyonguy pointed out the default number of bars being summed in the sum() is 12 bars. So the above is attempting to sum the 12 weekly bars.
For several reasons, the above definition will not match other sites.
1. statements that use secondary aggregations are called "MTF" indicators.
MTF indicators are repainting every tick until the week closes.
2. the various apps (ToS, Tradestation, etc...) data feeds have never been able to be made to align with Google. It would seem that this is a known issue. However, there is no total agreement as to why.