Files
ferro-ta/src/pattern/cdlharamicross.rs
T

19 lines
558 B
Rust
Raw Normal View History

2026-03-23 23:34:28 +05:30
use numpy::{IntoPyArray, PyArray1, PyReadonlyArray1};
use pyo3::prelude::*;
#[pyfunction]
pub fn cdlharamicross<'py>(
py: Python<'py>,
open: PyReadonlyArray1<'py, f64>,
high: PyReadonlyArray1<'py, f64>,
low: PyReadonlyArray1<'py, f64>,
close: PyReadonlyArray1<'py, f64>,
) -> PyResult<Bound<'py, PyArray1<i32>>> {
2026-03-30 12:45:52 +05:30
let o = open.as_slice()?;
let h = high.as_slice()?;
let l = low.as_slice()?;
let c = close.as_slice()?;
let result = ferro_ta_core::pattern::cdlharamicross(o, h, l, c);
2026-03-23 23:34:28 +05:30
Ok(result.into_pyarray(py))
}