Skip to content

Commit

Permalink
bottle
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Jul 30, 2023
1 parent 803525f commit c545041
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ta_lib/patterns/src/bottle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ mod tests {
use super::*;

#[test]
fn test_barrier_bullish() {
let open = vec![4.0, 3.0, 4.0, 3.0, 4.0];
let low = vec![4.0, 3.0, 4.0, 3.0, 4.0];
let close = vec![4.5, 3.5, 4.5, 3.5, 4.5];
fn test_bottle_bullish() {
let open = vec![4.0, 3.0, 4.0, 3.0, 5.0];
let low = vec![3.5, 2.5, 3.5, 2.5, 4.5];
let close = vec![4.5, 4.0, 5.0, 4.5, 5.5];
let expected = vec![false, false, false, false, false];

let result = bullish(&open, &low, &close);
Expand All @@ -43,10 +43,10 @@ mod tests {
}

#[test]
fn test_barrier_bearish() {
let open = vec![4.0, 3.0, 4.0, 3.0, 4.0];
let high = vec![4.0, 3.0, 4.0, 3.0, 4.0];
let close = vec![3.5, 2.5, 3.5, 2.5, 3.5];
fn test_bottle_bearish() {
let open = vec![4.0, 5.0, 4.0, 5.0, 4.0];
let high = vec![4.5, 5.5, 4.5, 5.5, 4.5];
let close = vec![3.5, 4.0, 3.5, 4.0, 3.5];
let expected = vec![false, false, false, false, false];

let result = bearish(&open, &high, &close);
Expand Down

0 comments on commit c545041

Please sign in to comment.