The trading_volume() is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base R, and the package-wide
dependencies. Ie. class in, class out. Each method is a soft wrapper of model.frame and therefore the OHLC-V series must be coercible to a data.frame.
trading_volume() also accepts a double vector in which case the indicator is calculated 'as-is' without passing through model.frame. trading_volume() returns an n by k matrix computed in C by default. When k = 1, the result is simplified to a double vector; for k > 1, the full n by k matrix is returned.
Arguments
- x
An OHLC-V series that is coercible to data.frame. Alternatively,
xmay also be supplied as a double vector.- cols
(formula). An optional
1variable formula passed into model.frame. Internally uses~volumeby default.- ma
An optional list of moving average specifications.
- ...
Additional parameters passed into model.frame
See also
Other Volume Indicator:
chaikin_accumulation_distribution_line(),
chaikin_accumulation_distribution_oscillator(),
on_balance_volume()
