From 067562cd5e2c48371cceece17ebe6855b8fd0b33 Mon Sep 17 00:00:00 2001 From: m5l14i11 Date: Fri, 4 Aug 2023 00:17:53 +0300 Subject: [PATCH] refactor --- ta_lib/Cargo.toml | 8 ++++---- ta_lib/indicators/momentum/Cargo.toml | 9 +++++++++ ta_lib/{ => indicators}/momentum/src/aosc.rs | 0 ta_lib/{ => indicators}/momentum/src/lib.rs | 0 ta_lib/{ => indicators}/momentum/src/macd.rs | 0 ta_lib/{ => indicators}/momentum/src/rsi.rs | 0 ta_lib/{ => indicators}/momentum/src/stochosc.rs | 0 ta_lib/{ => indicators}/trend/Cargo.toml | 2 +- ta_lib/{ => indicators}/trend/src/ema.rs | 0 ta_lib/{ => indicators}/trend/src/lib.rs | 0 ta_lib/{ => indicators}/trend/src/sma.rs | 0 ta_lib/{ => indicators}/trend/src/smma.rs | 0 ta_lib/{ => indicators}/trend/src/wma.rs | 0 ta_lib/{ => indicators}/trend/src/zlema.rs | 0 ta_lib/{ => indicators}/volatility/Cargo.toml | 4 ++-- ta_lib/{ => indicators}/volatility/src/atr.rs | 0 ta_lib/{ => indicators}/volatility/src/bbands.rs | 0 ta_lib/{ => indicators}/volatility/src/lib.rs | 0 ta_lib/indicators/volume/Cargo.toml | 9 +++++++++ ta_lib/{ => indicators}/volume/src/lib.rs | 0 ta_lib/{ => indicators}/volume/src/mfi.rs | 0 ta_lib/{ => indicators}/volume/src/vo.rs | 0 ta_lib/{ => indicators}/volume/src/vwap.rs | 0 ta_lib/momentum/Cargo.toml | 9 --------- ta_lib/volume/Cargo.toml | 9 --------- 25 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 ta_lib/indicators/momentum/Cargo.toml rename ta_lib/{ => indicators}/momentum/src/aosc.rs (100%) rename ta_lib/{ => indicators}/momentum/src/lib.rs (100%) rename ta_lib/{ => indicators}/momentum/src/macd.rs (100%) rename ta_lib/{ => indicators}/momentum/src/rsi.rs (100%) rename ta_lib/{ => indicators}/momentum/src/stochosc.rs (100%) rename ta_lib/{ => indicators}/trend/Cargo.toml (71%) rename ta_lib/{ => indicators}/trend/src/ema.rs (100%) rename ta_lib/{ => indicators}/trend/src/lib.rs (100%) rename ta_lib/{ => indicators}/trend/src/sma.rs (100%) rename ta_lib/{ => indicators}/trend/src/smma.rs (100%) rename ta_lib/{ => indicators}/trend/src/wma.rs (100%) rename ta_lib/{ => indicators}/trend/src/zlema.rs (100%) rename ta_lib/{ => indicators}/volatility/Cargo.toml (63%) rename ta_lib/{ => indicators}/volatility/src/atr.rs (100%) rename ta_lib/{ => indicators}/volatility/src/bbands.rs (100%) rename ta_lib/{ => indicators}/volatility/src/lib.rs (100%) create mode 100644 ta_lib/indicators/volume/Cargo.toml rename ta_lib/{ => indicators}/volume/src/lib.rs (100%) rename ta_lib/{ => indicators}/volume/src/mfi.rs (100%) rename ta_lib/{ => indicators}/volume/src/vo.rs (100%) rename ta_lib/{ => indicators}/volume/src/vwap.rs (100%) delete mode 100644 ta_lib/momentum/Cargo.toml delete mode 100644 ta_lib/volume/Cargo.toml diff --git a/ta_lib/Cargo.toml b/ta_lib/Cargo.toml index 5ac94084..587e8890 100644 --- a/ta_lib/Cargo.toml +++ b/ta_lib/Cargo.toml @@ -1,13 +1,13 @@ [workspace] members = [ "core", -"momentum", +"indicators/momentum", +"indicators/trend", +"indicators/volatility", +"indicators/volume", "patterns", "price", "strategy", -"trend", -"volatility", -"volume", "utils" ] diff --git a/ta_lib/indicators/momentum/Cargo.toml b/ta_lib/indicators/momentum/Cargo.toml new file mode 100644 index 00000000..70d06211 --- /dev/null +++ b/ta_lib/indicators/momentum/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "momentum" +version = "0.1.0" +edition = "2021" + +[dependencies] +core = { path = "../../core" } +price = { path = "../../price" } +utils = { path = "../../utils" } diff --git a/ta_lib/momentum/src/aosc.rs b/ta_lib/indicators/momentum/src/aosc.rs similarity index 100% rename from ta_lib/momentum/src/aosc.rs rename to ta_lib/indicators/momentum/src/aosc.rs diff --git a/ta_lib/momentum/src/lib.rs b/ta_lib/indicators/momentum/src/lib.rs similarity index 100% rename from ta_lib/momentum/src/lib.rs rename to ta_lib/indicators/momentum/src/lib.rs diff --git a/ta_lib/momentum/src/macd.rs b/ta_lib/indicators/momentum/src/macd.rs similarity index 100% rename from ta_lib/momentum/src/macd.rs rename to ta_lib/indicators/momentum/src/macd.rs diff --git a/ta_lib/momentum/src/rsi.rs b/ta_lib/indicators/momentum/src/rsi.rs similarity index 100% rename from ta_lib/momentum/src/rsi.rs rename to ta_lib/indicators/momentum/src/rsi.rs diff --git a/ta_lib/momentum/src/stochosc.rs b/ta_lib/indicators/momentum/src/stochosc.rs similarity index 100% rename from ta_lib/momentum/src/stochosc.rs rename to ta_lib/indicators/momentum/src/stochosc.rs diff --git a/ta_lib/trend/Cargo.toml b/ta_lib/indicators/trend/Cargo.toml similarity index 71% rename from ta_lib/trend/Cargo.toml rename to ta_lib/indicators/trend/Cargo.toml index c9d88974..b6a1229e 100644 --- a/ta_lib/trend/Cargo.toml +++ b/ta_lib/indicators/trend/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -core = { path = "../core" } +core = { path = "../../core" } diff --git a/ta_lib/trend/src/ema.rs b/ta_lib/indicators/trend/src/ema.rs similarity index 100% rename from ta_lib/trend/src/ema.rs rename to ta_lib/indicators/trend/src/ema.rs diff --git a/ta_lib/trend/src/lib.rs b/ta_lib/indicators/trend/src/lib.rs similarity index 100% rename from ta_lib/trend/src/lib.rs rename to ta_lib/indicators/trend/src/lib.rs diff --git a/ta_lib/trend/src/sma.rs b/ta_lib/indicators/trend/src/sma.rs similarity index 100% rename from ta_lib/trend/src/sma.rs rename to ta_lib/indicators/trend/src/sma.rs diff --git a/ta_lib/trend/src/smma.rs b/ta_lib/indicators/trend/src/smma.rs similarity index 100% rename from ta_lib/trend/src/smma.rs rename to ta_lib/indicators/trend/src/smma.rs diff --git a/ta_lib/trend/src/wma.rs b/ta_lib/indicators/trend/src/wma.rs similarity index 100% rename from ta_lib/trend/src/wma.rs rename to ta_lib/indicators/trend/src/wma.rs diff --git a/ta_lib/trend/src/zlema.rs b/ta_lib/indicators/trend/src/zlema.rs similarity index 100% rename from ta_lib/trend/src/zlema.rs rename to ta_lib/indicators/trend/src/zlema.rs diff --git a/ta_lib/volatility/Cargo.toml b/ta_lib/indicators/volatility/Cargo.toml similarity index 63% rename from ta_lib/volatility/Cargo.toml rename to ta_lib/indicators/volatility/Cargo.toml index 1e6fdd01..3fa0c744 100644 --- a/ta_lib/volatility/Cargo.toml +++ b/ta_lib/indicators/volatility/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -core = { path = "../core" } +core = { path = "../../core" } trend = { path = "../trend" } -utils = { path = "../utils" } +utils = { path = "../../utils" } diff --git a/ta_lib/volatility/src/atr.rs b/ta_lib/indicators/volatility/src/atr.rs similarity index 100% rename from ta_lib/volatility/src/atr.rs rename to ta_lib/indicators/volatility/src/atr.rs diff --git a/ta_lib/volatility/src/bbands.rs b/ta_lib/indicators/volatility/src/bbands.rs similarity index 100% rename from ta_lib/volatility/src/bbands.rs rename to ta_lib/indicators/volatility/src/bbands.rs diff --git a/ta_lib/volatility/src/lib.rs b/ta_lib/indicators/volatility/src/lib.rs similarity index 100% rename from ta_lib/volatility/src/lib.rs rename to ta_lib/indicators/volatility/src/lib.rs diff --git a/ta_lib/indicators/volume/Cargo.toml b/ta_lib/indicators/volume/Cargo.toml new file mode 100644 index 00000000..d5f547b0 --- /dev/null +++ b/ta_lib/indicators/volume/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "volume" +version = "0.1.0" +edition = "2021" + +[dependencies] +core = { path = "../../core" } +price = { path = "../../price" } +utils = { path = "../../utils" } diff --git a/ta_lib/volume/src/lib.rs b/ta_lib/indicators/volume/src/lib.rs similarity index 100% rename from ta_lib/volume/src/lib.rs rename to ta_lib/indicators/volume/src/lib.rs diff --git a/ta_lib/volume/src/mfi.rs b/ta_lib/indicators/volume/src/mfi.rs similarity index 100% rename from ta_lib/volume/src/mfi.rs rename to ta_lib/indicators/volume/src/mfi.rs diff --git a/ta_lib/volume/src/vo.rs b/ta_lib/indicators/volume/src/vo.rs similarity index 100% rename from ta_lib/volume/src/vo.rs rename to ta_lib/indicators/volume/src/vo.rs diff --git a/ta_lib/volume/src/vwap.rs b/ta_lib/indicators/volume/src/vwap.rs similarity index 100% rename from ta_lib/volume/src/vwap.rs rename to ta_lib/indicators/volume/src/vwap.rs diff --git a/ta_lib/momentum/Cargo.toml b/ta_lib/momentum/Cargo.toml deleted file mode 100644 index 424c979b..00000000 --- a/ta_lib/momentum/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "momentum" -version = "0.1.0" -edition = "2021" - -[dependencies] -core = { path = "../core" } -price = { path = "../price" } -utils = { path = "../utils" } diff --git a/ta_lib/volume/Cargo.toml b/ta_lib/volume/Cargo.toml deleted file mode 100644 index 920a1297..00000000 --- a/ta_lib/volume/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "volume" -version = "0.1.0" -edition = "2021" - -[dependencies] -core = { path = "../core" } -price = { path = "../price" } -utils = { path = "../utils" }