Refactor, and added strategy with risk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user