This commit is contained in:
2026-07-30 04:44:21 +02:00
parent 8dcf6b2a41
commit 87e3c2b964
8 changed files with 95 additions and 236 deletions
+9 -11
View File
@@ -1,7 +1,6 @@
use hypersdk::hypercore::Side;
use rust_decimal::Decimal;
use crate::units::{Direction, Symbol, USD};
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub enum MarketTrend {
Bullish,
@@ -20,12 +19,11 @@ pub enum LogKind {
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Signal {
pub symbol: String,
pub kind: Direction,
pub side: Side,
pub confidence: f32,
pub size: Decimal,
pub price: USD,
pub take_profit: USD,
pub stop_loss: USD,
pub price: Decimal,
pub take_profit: Decimal,
pub stop_loss: Decimal,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
@@ -37,10 +35,10 @@ pub struct EventLog {
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Position {
pub symbol: Symbol,
pub size: f64,
pub entry_price: USD,
pub profit: USD,
pub symbol: String,
pub size: Decimal,
pub entry_price: Decimal,
pub pnl: Decimal,
}
impl std::fmt::Display for MarketTrend {