diff --git a/ta_lib/Cargo.lock b/ta_lib/Cargo.lock index a5a635e9..8769d2ac 100644 --- a/ta_lib/Cargo.lock +++ b/ta_lib/Cargo.lock @@ -2,6 +2,13 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "base" +version = "0.1.0" +dependencies = [ + "price", +] + [[package]] name = "core" version = "0.1.0" @@ -29,13 +36,6 @@ dependencies = [ "core", ] -[[package]] -name = "strategy" -version = "0.1.0" -dependencies = [ - "price", -] - [[package]] name = "trend" version = "0.1.0" diff --git a/ta_lib/Cargo.toml b/ta_lib/Cargo.toml index 587e8890..8d0b4c5b 100644 --- a/ta_lib/Cargo.toml +++ b/ta_lib/Cargo.toml @@ -7,7 +7,7 @@ members = [ "indicators/volume", "patterns", "price", -"strategy", +"strategies/base", "utils" ] diff --git a/ta_lib/strategy/Cargo.toml b/ta_lib/strategies/base/Cargo.toml similarity index 55% rename from ta_lib/strategy/Cargo.toml rename to ta_lib/strategies/base/Cargo.toml index cfcd7ea1..ea5eca03 100644 --- a/ta_lib/strategy/Cargo.toml +++ b/ta_lib/strategies/base/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "strategy" +name = "base" version = "0.1.0" edition = "2021" [dependencies] -price = { path = "../price" } +price = { path = "../../price" } diff --git a/ta_lib/strategy/src/base.rs b/ta_lib/strategies/base/src/base.rs similarity index 99% rename from ta_lib/strategy/src/base.rs rename to ta_lib/strategies/base/src/base.rs index 1bb5f7b6..c93393f0 100644 --- a/ta_lib/strategy/src/base.rs +++ b/ta_lib/strategies/base/src/base.rs @@ -4,6 +4,7 @@ use std::{ collections::{HashMap, VecDeque}, }; +#[derive(Debug, Clone, Copy)] pub struct OHLCV { pub open: f64, pub high: f64, diff --git a/ta_lib/strategies/base/src/lib.rs b/ta_lib/strategies/base/src/lib.rs new file mode 100644 index 00000000..307b3591 --- /dev/null +++ b/ta_lib/strategies/base/src/lib.rs @@ -0,0 +1 @@ +pub mod base; \ No newline at end of file diff --git a/ta_lib/strategy/src/lib.rs b/ta_lib/strategy/src/lib.rs deleted file mode 100644 index 6cf245d4..00000000 --- a/ta_lib/strategy/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod base;