Name refactor
This commit is contained in:
+17
-17
@@ -1,35 +1,35 @@
|
||||
use crate::PulseCom;
|
||||
use pulse_macros::p_com;
|
||||
use crate::PulseWire;
|
||||
use pulse_macros::pwp;
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct WatchListItem {
|
||||
symbol: String,
|
||||
price: f64,
|
||||
trend: f64,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct ActivePosition {
|
||||
symbol: String,
|
||||
profit: f64,
|
||||
amount: f64,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum MarketTrend {
|
||||
Bullish,
|
||||
Bearish,
|
||||
Neutral,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum Volatility {
|
||||
Low,
|
||||
Medium,
|
||||
High,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct MarketOverview {
|
||||
trend: MarketTrend,
|
||||
volatility: Volatility,
|
||||
@@ -38,7 +38,7 @@ pub struct MarketOverview {
|
||||
alerts: Vec<Alert>,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum Feed {
|
||||
Connected,
|
||||
Disconnected,
|
||||
@@ -46,7 +46,7 @@ pub enum Feed {
|
||||
Failed,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct Status {
|
||||
feed: Feed,
|
||||
exchange: String,
|
||||
@@ -54,13 +54,13 @@ pub struct Status {
|
||||
latency: u16,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum SignalKind {
|
||||
Buy,
|
||||
Sell,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum SignalParameter {
|
||||
Lim,
|
||||
Stl,
|
||||
@@ -68,7 +68,7 @@ pub enum SignalParameter {
|
||||
Chk,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct Signal {
|
||||
kind: SignalKind,
|
||||
symbol: String,
|
||||
@@ -76,7 +76,7 @@ pub struct Signal {
|
||||
price: f64,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum LogKind {
|
||||
Info,
|
||||
Warn,
|
||||
@@ -84,27 +84,27 @@ pub enum LogKind {
|
||||
Debug,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct EventLog {
|
||||
kind: LogKind,
|
||||
name: String,
|
||||
message: String,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum AlertLevel {
|
||||
High,
|
||||
Medium,
|
||||
Low,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub struct Alert {
|
||||
level: AlertLevel,
|
||||
message: String,
|
||||
}
|
||||
|
||||
#[p_com]
|
||||
#[pwp]
|
||||
pub enum InspectTarget {
|
||||
None,
|
||||
Symbol(WatchListItem),
|
||||
|
||||
Reference in New Issue
Block a user