Refactor, and added strategy with risk

This commit is contained in:
2026-07-25 17:09:35 +02:00
parent f31eaac63e
commit 9c367b3807
13 changed files with 78 additions and 41 deletions
+30
View File
@@ -1,3 +1,5 @@
use pulse_macros::pwp;
use crate::PulseWire;
#[derive(Debug, Clone)]
@@ -6,6 +8,34 @@ pub struct Symbol(pub String);
#[derive(Debug, Clone, Copy)]
pub struct USD(pub f64);
#[pwp]
#[derive(Copy, serde::Deserialize, serde::Serialize)]
pub enum TimeFrame {
M1,
M3,
M5,
M15,
M30,
H1,
H2,
H4,
H8,
H12,
D1,
D3,
W1,
Month1,
}
#[pwp]
pub enum Direction {
Buy,
Sell,
}
impl std::fmt::Display for Symbol {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "\x1b[35m{}\x1b[0m", self.0)