Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed May 1, 2024
1 parent 04a8b5f commit b2cfffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ta_lib/indicators/volume/src/mfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn mfi(hlc3: &Series<f32>, volume: &Series<f32>, period: usize) -> Series<f3

let mfi = SCALE - SCALE / (1. + money_ratio);

mfi.nz(Some(50.))
mfi.nz(Some(0.5 * SCALE))
}

#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion ta_lib/indicators/volume/src/obv.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::prelude::*;

pub fn obv(source: &Series<f32>, volume: &Series<f32>) -> Series<f32> {
(source.change(1).nz(Some(0.)).sign() * volume).cumsum()
(source.change(1).nz(Some(ZERO)).sign() * volume).cumsum()
}

#[cfg(test)]
Expand Down

0 comments on commit b2cfffc

Please sign in to comment.