A few additional nits about the Workshop 5.
1. Further down it says
The result Period is a series containing the current dominant period lengths.
The variable Period is a single var, not a series.
2.
vars HP = series(HighPass(Price, LowPeriod));
This is different from the script
vars HP = series(HighPass(Price,Period));
3.
plot("DominantPeriod", Period, NEW, BLUE);
This line generates a plot of the LowPeriod variable
errrrm
same with "The
LowPeriod variable, used for the HighPass filter time period, is multiplied with the return value of an optimize function" etc.