Functions accepting variable periods

The following functions support variable periods (where the periods parameter can be an array and changes from bar to bar):