pub struct RithmicBracketOrder {
pub action: TransactionType,
pub duration: Duration,
pub exchange: String,
pub localid: String,
pub price_type: PriceType,
pub price: Option<f64>,
pub profit_ticks: i32,
pub qty: i32,
pub stop_ticks: i32,
pub symbol: String,
}Expand description
Entry order with linked profit target and stop loss orders.
When the entry fills, the system creates the profit target and stop loss orders automatically.
§Example
ⓘ
use rithmic_rs::{RithmicBracketOrder, BracketTransactionType, BracketDuration, BracketPriceType};
let order = RithmicBracketOrder {
symbol: "ESM5".to_string(),
exchange: "CME".to_string(),
action: BracketTransactionType::Buy,
qty: 1,
price_type: BracketPriceType::Limit,
price: Some(5000.0),
duration: BracketDuration::Day,
profit_ticks: 20, // 20 ticks above entry
stop_ticks: 10, // 10 ticks below entry
localid: "my-order-1".to_string(),
};Fields§
§action: TransactionTypeBuy or Sell
duration: DurationOrder duration
exchange: StringExchange code (e.g., “CME”)
localid: StringYour identifier for tracking this order
price_type: PriceTypeOrder type
price: Option<f64>Limit price (required for Limit orders)
profit_ticks: i32Profit target distance in ticks from entry
qty: i32Number of contracts
stop_ticks: i32Stop loss distance in ticks from entry
symbol: StringTrading symbol (e.g., “ESM5”)
Trait Implementations§
Source§impl Clone for RithmicBracketOrder
impl Clone for RithmicBracketOrder
Source§fn clone(&self) -> RithmicBracketOrder
fn clone(&self) -> RithmicBracketOrder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RithmicBracketOrder
impl RefUnwindSafe for RithmicBracketOrder
impl Send for RithmicBracketOrder
impl Sync for RithmicBracketOrder
impl Unpin for RithmicBracketOrder
impl UnwindSafe for RithmicBracketOrder
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