pub struct Vwap {
pub params: VwapParams,
}Fields§
§params: VwapParamsImplementations§
Trait Implementations§
Source§impl Indicator for Vwap
impl Indicator for Vwap
Source§fn calculate(
&self,
candles: &[Candle],
) -> Result<IndicatorOutput, IndicatorError>
fn calculate( &self, candles: &[Candle], ) -> Result<IndicatorOutput, IndicatorError>
Cumulative VWAP: cumsum(tp * vol) / cumsum(vol) — no NaN warm-up.
Rolling VWAP: rolling_sum(tp * vol, N) / rolling_sum(vol, N) —
NaN for the first period - 1 positions.
tp (typical price) = (high + low + close) / 3.
Source§fn required_len(&self) -> usize
fn required_len(&self) -> usize
Minimum number of candles required before output is non-
NaN.
Mirrors Python’s implicit warm-up period used for validation.Source§fn required_columns(&self) -> &[&'static str]
fn required_columns(&self) -> &[&'static str]
Which OHLCV fields this indicator reads. Read more
Auto Trait Implementations§
impl Freeze for Vwap
impl RefUnwindSafe for Vwap
impl Send for Vwap
impl Sync for Vwap
impl Unpin for Vwap
impl UnsafeUnpin for Vwap
impl UnwindSafe for Vwap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more