Indicators
Volume Rate of Change
Description
The Volume Rate of Change (VROC) is the indicator that shows whether or not a volume trend is developing in either an up or down direction. You may be familiar with price rate of change (discussed here), which shows an investor the rate of change measured by the issue's closing price.
For more information, please visit Investopedia.
Params & Instance Methods
#initialize @param series [Array] An array of volume values @param period [Integer] The number of periods to use in the calculation - default is 25 #call @return [Float] The current volume rate of change value #valid? @return [Boolean] Whether or not the object is valid
Example
require 'ruby-technical-analysis' series = [9_996, 12_940, 37_524, 21_032, 14_880, 21_304] period = 5 volume_rate_of_change = RubyTechnicalAnalysis::VolumeRateOfChange.new( series: series, period: period ) p volume_rate_of_change.valid? # true p volume_rate_of_change.call # 113.1253