pub struct TradingSettings {Show 18 fields
pub instant_orders: bool,
pub bid_ask_labels: bool,
pub play_execution_sound: bool,
pub execution_sound: String,
pub execution_sound_volume: f32,
pub notifications: TradingNotifications,
pub show_positions: bool,
pub position_pnl: bool,
pub position_pnl_unit: PnlUnit,
pub reverse_button: bool,
pub extend_lines: bool,
pub label_alignment: TradingLabelAlignment,
pub include_in_image: bool,
pub show_orders: bool,
pub bracket_pnl: bool,
pub bracket_pnl_unit: PnlUnit,
pub show_executions: bool,
pub show_execution_labels: bool,
}Expand description
Trading tab settings: the Buy and Sell buttons’ behaviour, notifications and the layers
ui::trading::Trading::show draws through Trading::display with the ui feature.
The Buy and Sell buttons themselves are StatusLineOptions::show_quote_boxes.
Saved settings without a field take its default, unless the field says otherwise.
Fields§
§instant_orders: boolBuy and Sell place a market order of the order quantity at once instead of opening the order ticket.
bid_ask_labels: boolShow current Bid and Ask tags supplied by the quote source.
play_execution_sound: boolAsk the host to play execution_sound for every fill, through
ui::trading::Trading::take_execution_sound with the ui feature.
execution_sound: StringThe name of the sound the host plays for fills, one of the
SettingsDialog::execution_sounds with the ui feature; empty for the host’s first.
execution_sound_volume: f32Local execution sound gain, from zero (muted) to one.
notifications: TradingNotificationsWhich trading events raise a notification.
show_positions: boolDraw the open positions.
position_pnl: boolGive each position’s profit or loss on its label.
position_pnl_unit: PnlUnitThe unit of the positions’ profit or loss.
Show a position’s reverse button while its label is hovered.
extend_lines: boolExtend trading lines to the left edge of the pane instead of starting at their labels.
label_alignment: TradingLabelAlignmentHorizontal placement of order and position labels.
include_in_image: boolInclude the visible trading overlays in images exported through ui::trading::Trading.
show_orders: boolDraw the working orders and their brackets.
bracket_pnl: boolGive on each take profit and stop loss the profit or loss of reaching it.
bracket_pnl_unit: PnlUnitThe unit of the brackets’ profit or loss.
show_executions: boolDraw the fills on their bars.
show_execution_labels: boolWrite the side and total quantity beside each fill’s mark. On for new settings; settings saved without this field keep labels off, as they were drawn when saved.
Trait Implementations§
Source§impl Clone for TradingSettings
impl Clone for TradingSettings
Source§fn clone(&self) -> TradingSettings
fn clone(&self) -> TradingSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TradingSettings
impl Debug for TradingSettings
Source§impl Default for TradingSettings
impl Default for TradingSettings
Source§impl<'de> Deserialize<'de> for TradingSettingswhere
TradingSettings: Default,
impl<'de> Deserialize<'de> for TradingSettingswhere
TradingSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TradingSettings
impl PartialEq for TradingSettings
Source§impl Serialize for TradingSettings
impl Serialize for TradingSettings
impl StructuralPartialEq for TradingSettings
Auto Trait Implementations§
impl Freeze for TradingSettings
impl RefUnwindSafe for TradingSettings
impl Send for TradingSettings
impl Sync for TradingSettings
impl Unpin for TradingSettings
impl UnsafeUnpin for TradingSettings
impl UnwindSafe for TradingSettings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more