pub struct Signal {
pub id: String,
pub strategy_id: String,
pub symbol: String,
pub direction: String,
pub confidence: f64,
pub entry_price: Option<f64>,
pub stop_loss: Option<f64>,
pub take_profit: Option<f64>,
pub reasoning: String,
pub timestamp_ns: i64,
}Expand description
Trading signal from a strategy
Fields§
§id: String§strategy_id: String§symbol: String§direction: String§confidence: f64§entry_price: Option<f64>§stop_loss: Option<f64>§take_profit: Option<f64>§reasoning: String§timestamp_ns: i64Trait Implementations§
Source§impl FromNapiValue for Signal
impl FromNapiValue for Signal
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Signal
impl ToNapiValue for Signal
Source§unsafe fn to_napi_value(env: napi_env, val: Signal) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Signal) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for Signal
impl ValidateNapiValue for Signal
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnwindSafe for Signal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more