Fix cooldown display
This commit is contained in:
Generated
+1
@@ -3882,6 +3882,7 @@ dependencies = [
|
|||||||
name = "pulse-trader"
|
name = "pulse-trader"
|
||||||
version = "0.1.0-alpha.0"
|
version = "0.1.0-alpha.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossterm",
|
"crossterm",
|
||||||
"hypersdk",
|
"hypersdk",
|
||||||
|
|||||||
+13
-4
@@ -6,15 +6,23 @@ edition = "2024"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
pulse-ui = { workspace = true }
|
pulse-ui = { workspace = true }
|
||||||
pulse-wire = { workspace = true }
|
pulse-wire = { workspace = true }
|
||||||
|
|
||||||
chrono = "0.4.45"
|
|
||||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net", "fs", "io-util", "time", "process"] }
|
|
||||||
crossterm = { workspace = true }
|
crossterm = { workspace = true }
|
||||||
hypersdk = { workspace = true }
|
hypersdk = { workspace = true }
|
||||||
|
serde = { workspace = true }
|
||||||
|
anyhow = { workspace = true }
|
||||||
|
tokio = { workspace = true, features = [
|
||||||
|
"rt-multi-thread",
|
||||||
|
"macros",
|
||||||
|
"net",
|
||||||
|
"fs",
|
||||||
|
"io-util",
|
||||||
|
"time",
|
||||||
|
"process",
|
||||||
|
] }
|
||||||
|
chrono = "0.4.45"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
rand = "0.8.7"
|
rand = "0.8.7"
|
||||||
toml = "1.1.3"
|
toml = "1.1.3"
|
||||||
serde = { workspace = true }
|
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["pulse-macros", "pulse-ui", "pulse-wire"]
|
members = ["pulse-macros", "pulse-ui", "pulse-wire"]
|
||||||
@@ -27,6 +35,7 @@ hypersdk = "0.2.14"
|
|||||||
tokio = "1.52.3"
|
tokio = "1.52.3"
|
||||||
crossterm = "0.29.0"
|
crossterm = "0.29.0"
|
||||||
serde = { version = "1.0.229", features = ["serde_derive"] }
|
serde = { version = "1.0.229", features = ["serde_derive"] }
|
||||||
|
anyhow = "1.0.104"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pulse-trader"
|
name = "pulse-trader"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ mod hyper_types;
|
|||||||
pub mod plugin;
|
pub mod plugin;
|
||||||
pub mod terminal;
|
pub mod terminal;
|
||||||
pub mod units;
|
pub mod units;
|
||||||
|
pub use hypersdk;
|
||||||
|
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use crate::PulseWire;
|
pub use crate::PulseWire;
|
||||||
@@ -14,6 +15,7 @@ pub mod prelude {
|
|||||||
pub use crate::server_path;
|
pub use crate::server_path;
|
||||||
pub use crate::terminal::*;
|
pub use crate::terminal::*;
|
||||||
pub use crate::units::*;
|
pub use crate::units::*;
|
||||||
|
pub use hypersdk;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn server_path() -> PathBuf {
|
pub fn server_path() -> PathBuf {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ impl StrategyEngine {
|
|||||||
Arc::new(self)
|
Arc::new(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn run_strategy(&self) -> tokio::io::Result<()> {
|
pub async fn run_strategy(&self) -> anyhow::Result<()> {
|
||||||
let engine = self
|
let engine = self
|
||||||
.engine
|
.engine
|
||||||
.upgrade()
|
.upgrade()
|
||||||
@@ -157,8 +157,6 @@ impl StrategyEngine {
|
|||||||
Some(RiskMessage::Reject { reason }) => {}
|
Some(RiskMessage::Reject { reason }) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn spawn(self: &Arc<Self>) {
|
pub async fn spawn(self: &Arc<Self>) {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ pub mod store;
|
|||||||
pub mod terminal;
|
pub mod terminal;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> tokio::io::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
let engine = engine::Engine::new().await?;
|
let engine = engine::Engine::new().await?;
|
||||||
|
|
||||||
let terminal_server = engine.spawn_terminal_server().await;
|
let terminal_server = engine.spawn_terminal_server().await;
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ impl Formatted for Strategy {
|
|||||||
),
|
),
|
||||||
Triple(
|
Triple(
|
||||||
&format!(
|
&format!(
|
||||||
"\x1b[96m{:?}\x1b[0m (\x1b[90m{:?} rec\x1b[0m)",
|
"\x1b[96m{}\x1b[0m (\x1b[90m{} rec\x1b[0m)",
|
||||||
self.cooldown, self.risk.cooldown
|
self.cooldown, self.risk.cooldown
|
||||||
),
|
),
|
||||||
&format!("\x1b[96m{:?}\x1b[0m", self.strategy.author),
|
&format!("\x1b[96m{:?}\x1b[0m", self.strategy.author),
|
||||||
|
|||||||
Reference in New Issue
Block a user