Class MarketDepthControl
- Namespace
- StockSharp.Xaml
- Assembly
- StockSharp.Xaml.dll
The visual control displaying the order book with quotes (IOrderBookMessage).
public class MarketDepthControl : BaseGridControl, IPersistable, IComponentConnector
- Inheritance
-
MarketDepthControl
- Implements
-
IPersistable
- Inherited Members
- Extension Methods
Constructors
MarketDepthControl()
Initializes a new instance of the MarketDepthControl.
public MarketDepthControl()
Fields
AllowOwnOrderDragDropProperty
public static readonly DependencyProperty AllowOwnOrderDragDropProperty
Field Value
AllowSpreadToMoveProperty
public static readonly DependencyProperty AllowSpreadToMoveProperty
Field Value
AnimationDurationProperty
Animation duration.
public static readonly DependencyProperty AnimationDurationProperty
Field Value
CancelAnimationColorProperty
Cancel animation color.
public static readonly DependencyProperty CancelAnimationColorProperty
Field Value
DefaultDepth
The maximum depth by default which is equal to 20.
public const int DefaultDepth = 20
Field Value
ErrorAnimationColorProperty
Error animation color.
public static readonly DependencyProperty ErrorAnimationColorProperty
Field Value
FillAnimationColorProperty
Fill animation color.
public static readonly DependencyProperty FillAnimationColorProperty
Field Value
FillBuyAnimationColorProperty
Fill buy animation color.
public static readonly DependencyProperty FillBuyAnimationColorProperty
Field Value
FillSellAnimationColorProperty
Fill sell animation color.
public static readonly DependencyProperty FillSellAnimationColorProperty
Field Value
FillTextAnimationColorProperty
Fill text color.
public static readonly DependencyProperty FillTextAnimationColorProperty
Field Value
GroupCommand
The command for group market depth.
public static readonly RoutedCommand GroupCommand
Field Value
GroupResetCommand
The command for reset grouping market depth.
public static readonly RoutedCommand GroupResetCommand
Field Value
IsBidsOnTopProperty
public static readonly DependencyProperty IsBidsOnTopProperty
Field Value
IsOwnOrderDraggingKey
True if user is dragging an order.
public static readonly DependencyPropertyKey IsOwnOrderDraggingKey
Field Value
MaxBuyVolumeProperty
public static readonly DependencyProperty MaxBuyVolumeProperty
Field Value
MaxDepthProperty
public static readonly DependencyProperty MaxDepthProperty
Field Value
MaxSellVolumeProperty
public static readonly DependencyProperty MaxSellVolumeProperty
Field Value
MaxVolumeProperty
public static readonly DependencyProperty MaxVolumeProperty
Field Value
PriceTextFormatProperty
public static readonly DependencyProperty PriceTextFormatProperty
Field Value
RegisterAnimationColorProperty
Register animation color.
public static readonly DependencyProperty RegisterAnimationColorProperty
Field Value
RegisterOrderOnProperty
Execute order register trigger.
public static readonly DependencyProperty RegisterOrderOnProperty
Field Value
ShowBoardColumnProperty
public static readonly DependencyProperty ShowBoardColumnProperty
Field Value
ShowOwnVolumeColumnsProperty
public static readonly DependencyProperty ShowOwnVolumeColumnsProperty
Field Value
ShowSingleVolumeColumnProperty
public static readonly DependencyProperty ShowSingleVolumeColumnProperty
Field Value
SparseCommand
The command for sparse market depth.
public static readonly RoutedCommand SparseCommand
Field Value
SparseResetCommand
The command for reset sparsing market depth.
public static readonly RoutedCommand SparseResetCommand
Field Value
UseOrderAnimationsProperty
public static readonly DependencyProperty UseOrderAnimationsProperty
Field Value
VolumeTextFormatProperty
public static readonly DependencyProperty VolumeTextFormatProperty
Field Value
Properties
AllowOwnOrderDragDrop
Allow own orders drag and drop.
public bool AllowOwnOrderDragDrop { get; set; }
Property Value
AllowSpreadToMove
Gets or sets a value indicating whether the spread is allowed to move. When true, the spread can move up and down. When false, the spread stays in the middle.
public bool AllowSpreadToMove { get; set; }
Property Value
AnimationDuration
Animation duration.
public TimeSpan AnimationDuration { get; set; }
Property Value
AutoUpdateFormat
Automatically update format by UpdateFormat(Security). By default is on.
public bool AutoUpdateFormat { get; set; }
Property Value
CancelAnimationColor
Cancel animation color.
public Color CancelAnimationColor { get; set; }
Property Value
ErrorAnimationColor
Error animation color.
public Color ErrorAnimationColor { get; set; }
Property Value
FillAnimationColor
Fill animation color.
public Color FillAnimationColor { get; set; }
Property Value
FillBuyAnimationColor
Fill buy animation color.
public Color FillBuyAnimationColor { get; set; }
Property Value
FillSellAnimationColor
Fill sell animation color.
public Color FillSellAnimationColor { get; set; }
Property Value
FillTextAnimationColor
Fill text color.
public Color FillTextAnimationColor { get; set; }
Property Value
GroupRange
Range for Group(IOrderBookMessage, decimal).
public decimal? GroupRange { get; set; }
Property Value
IsBidsOnTop
Whether to show the bids above. The default is off.
public bool IsBidsOnTop { get; set; }
Property Value
IsOwnOrderDragging
True if user is dragging an order.
public bool IsOwnOrderDragging { get; }
Property Value
MaxBuyVolume
The maximum volume of all bids.
public decimal MaxBuyVolume { get; set; }
Property Value
MaxDepth
The maximum depth of order book display. The default value is DefaultDepth.
public int MaxDepth { get; set; }
Property Value
MaxSellVolume
The maximum volume of all asks.
public decimal MaxSellVolume { get; set; }
Property Value
MaxVolume
The maximum volume of all quotes.
public decimal MaxVolume { get; set; }
Property Value
PriceTextFormat
Price format.
public string PriceTextFormat { get; set; }
Property Value
RegisterAnimationColor
Register animation color.
public Color RegisterAnimationColor { get; set; }
Property Value
RegisterOrderOn
Execute order register trigger.
public MarketDepthExecuteOn RegisterOrderOn { get; set; }
Property Value
SelectedQuote
The selected quote.
public QuoteChange? SelectedQuote { get; }
Property Value
ShowBoardColumn
Show Board column.
public bool ShowBoardColumn { get; set; }
Property Value
ShowOwnVolumeColumns
Show own volume columns.
public bool ShowOwnVolumeColumns { get; set; }
Property Value
ShowSingleVolumeColumn
public bool ShowSingleVolumeColumn { get; set; }
Property Value
SparseRange
Range for Sparse(IOrderBookMessage, decimal, decimal?).
public decimal? SparseRange { get; set; }
Property Value
UseOrderAnimations
User own order state animations.
public bool UseOrderAnimations { get; set; }
Property Value
VolumeTextFormat
Volume format.
public string VolumeTextFormat { get; set; }
Property Value
Methods
CancelOrders(Func<Order, bool>)
Cancel orders that were added to this instance of MarketDepthControl. This method does not cancel orders by itself. It just notifies subscribers with CancelingOrder event.
public void CancelOrders(Func<Order, bool> predicate = null)
Parameters
Clear()
To clear the order book.
public void Clear()
GetColumnIndex(GridColumn)
To get the column type by cell.
public MarketDepthColumns GetColumnIndex(GridColumn column)
Parameters
column
GridColumnColumn.
Returns
- MarketDepthColumns
The column type.
GetOrders(decimal, Sides?, OrderTypes?)
Get active orders by specified criteria.
public IEnumerable<Order> GetOrders(decimal price, Sides? side = null, OrderTypes? type = null)
Parameters
price
decimalOrder price.
side
Sides?Order side (buy or sell).
type
OrderTypes?Order type.
Returns
- IEnumerable<Order>
Found orders.
InitializeComponent()
InitializeComponent
public void InitializeComponent()
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnLostMouseCapture(MouseEventArgs)
protected override void OnLostMouseCapture(MouseEventArgs e)
Parameters
OnPreviewKeyDown(KeyEventArgs)
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
ProcessOrder(Order, decimal, decimal, OrderStates)
To handle an order.
public void ProcessOrder(Order order, decimal price, decimal balance, OrderStates state)
Parameters
order
OrderOrder.
price
decimalOrder price.
balance
decimalOrder contracts balance.
state
OrderStatesOrder state.
ProcessOrderFail(OrderFail, OrderStates)
To handle an order register/move/cancel fail.
public void ProcessOrderFail(OrderFail fail, OrderStates state)
Parameters
fail
OrderFailstate
OrderStates
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
ShowOrderFill(Sides, decimal, decimal)
Show order fill animation.
public void ShowOrderFill(Sides side, decimal price, decimal volume)
Parameters
UpdateDepth(IOrderBookMessage, Security)
To update the order book.
public void UpdateDepth(IOrderBookMessage message, Security security = null)
Parameters
message
IOrderBookMessageMarket depth.
security
SecuritySecurity.
UpdateFormat(Security)
To update PriceTextFormat and VolumeTextFormat.
public void UpdateFormat(Security security)
Parameters
security
SecuritySecurity.
Events
CancelingOrder
Canceling order.
public event Action<Order> CancelingOrder
Event Type
MovingOrder
Moving order to new price.
public event Action<Order, decimal> MovingOrder
Event Type
RegisteringOrder
Registering order.
public event Action<Sides, decimal> RegisteringOrder
Event Type
SelectedQuoteChanged
SelectedQuote changed event.
public event Action<QuoteChange?> SelectedQuoteChanged