Refactored entry price

This commit is contained in:
2026-07-31 02:21:17 +02:00
parent f3e2deab09
commit c9a37e4024
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ pub struct Signal {
pub symbol: String,
pub side: Side,
pub confidence: f32,
pub price: Decimal,
pub entry_price: Decimal,
pub take_profit: Decimal,
pub stop_loss: Decimal,
}
+3 -3
View File
@@ -35,7 +35,7 @@ impl Engine {
OrderRequest {
asset: asset_id,
is_buy: matches!(signal.side, Side::Bid),
limit_px: signal.price,
limit_px: signal.entry_price,
sz: 0.into(),
reduce_only: false,
order_type: OrderTypePlacement::Limit {
@@ -46,7 +46,7 @@ impl Engine {
OrderRequest {
asset: asset_id,
is_buy: matches!(signal.side, Side::Bid),
limit_px: signal.price,
limit_px: signal.entry_price,
sz: 0.into(),
reduce_only: true,
order_type: OrderTypePlacement::Trigger {
@@ -59,7 +59,7 @@ impl Engine {
OrderRequest {
asset: asset_id,
is_buy: matches!(signal.side, Side::Bid),
limit_px: signal.price,
limit_px: signal.entry_price,
sz: 0.into(),
reduce_only: true,
order_type: OrderTypePlacement::Trigger {
+2 -2
View File
@@ -54,7 +54,7 @@ impl Formatted for SignalStatus {
format!("\x1b[31mSELL\x1b[0m")
},
format_symbol(&signal.symbol),
format_usd(signal.price.as_f64()),
format_usd(signal.entry_price.as_f64()),
format!("\x1b[33mAPR {}\x1b[0m", signal.confidence),
]
}
@@ -68,7 +68,7 @@ impl Formatted for SignalStatus {
format!("\x1b[31mSELL\x1b[0m")
},
format_symbol(&signal.symbol),
format_usd(signal.price.as_f64()),
format_usd(signal.entry_price.as_f64()),
format!("\x1b[33mAPR {}\x1b[0m", signal.confidence),
]
}