Closed paroxysm closed 6 years ago
@paroxysm I think the indicator is working as expected. I should the remove the period parameter in the input.
Yes because it's misleading, that means it's up to the user to limit the number of inputs to 'period' rather than expecting the algorithm to. But this is inconsistent with other indicators such as RSI which DO limit calculations to 'period' values.
Fixed
VWAPInput takes a 'period' parameter, however in the actual code for calculation, it's never used. The correct behavior would be to assert that the length of the lows/highs/closes arrays should at least equal to 'period'. Then iterating over the lows to calculate the vwap, the algorithm should consider AT MOST 'period' values. Right now it considers all the values passed(even if their length > period)