MATLAB: How to weigh the most recent data more heavily than the older data using the “bollinger” function in financial toolbox

bollingerdataFinancial Toolboxordering

Given that my time series input data vector "a" is in order from oldest to newest, I looking for a way to weigh the most recent data more heavily than the older data using the "bollinger" function in financial toolbox.

Best Answer

Since the "bollinger" function assumes the data vector ordered from newest to oldest, sort data vector "a" into the order from newest to oldest by using,
>> a = fliplr(a);
and you are able to use the "bollinger" function with heavier weights on the newest data.