Add currency column to mview
This commit is contained in:
1 parent
44e864d697
commit
39da0a4dde
5 files changed
+9
-1
No files matched your search
@@ -36,6 +36,7 @@ namespace mbts.spark {
|
||||
Gamma,
|
||||
Vega,
|
||||
Theta,
|
||||
Rho
|
||||
Rho,
|
||||
Currency
|
||||
}
|
||||
}
|
||||
@@ -207,6 +207,7 @@
|
||||
public SecurityMD security_md { get; }
|
||||
public SecurityImmutable security => security_md.security;
|
||||
public uint security_key => security_md.security.Id;
|
||||
public string currency => security_md.security.Currency;
|
||||
|
||||
public bool inside_bids => _inside_bids.value;
|
||||
public bool inside_asks => _inside_asks.value;
|
||||
|
||||
@@ -93,6 +93,7 @@ namespace bts.shell.market_view {
|
||||
|
||||
static class DefaultColumns {
|
||||
public static GridColumnSettings security => _mk(Columns.Security, ColHeader.Security, ColWidth.Security, h_align: HorizontalAlignment.Left);
|
||||
public static GridColumnSettings currency => _mk(Columns.Currency, ColHeader.Currency, ColWidth.Currency, h_align: HorizontalAlignment.Left, is_visible: false);
|
||||
public static GridColumnSettings volume => _mk(Columns.Volume, ColHeader.Volume, ColWidth.Volume, h_align: HorizontalAlignment.Left);
|
||||
public static GridColumnSettings last => _mk(Columns.Last, ColHeader.Last, ColWidth.Price, h_align: HorizontalAlignment.Left);
|
||||
public static GridColumnSettings last_from_spread => _mk(Columns.LastSpd, "S", ColWidth.Price, is_visible: false, h_align: HorizontalAlignment.Left);
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace mbts.spark {
|
||||
_sec_meta_store = sec_meta_store;
|
||||
_settings_hub = settings_hub;
|
||||
security_filter = new RegexFilterVM<Row>(r => r.security.ToString(), nameof(Row.security));
|
||||
currency_filter =new RegexFilterVM<Row>(r => r.currency, nameof(Row.currency));
|
||||
// rows
|
||||
_wrapped_rows = _rows.WrapSelector(r => r.security_md, s => {
|
||||
var r = new Row(_bus, s, _orders_model, _position_model);
|
||||
@@ -122,6 +123,7 @@ namespace mbts.spark {
|
||||
var price_converter = new TickDisplayConverter();
|
||||
|
||||
add_col(ColKey.Security, r => r.security.ToString(), nameof(Row.security), security_filter, FilterType.Regex, ColWidth.Security);
|
||||
add_col(ColKey.Currency, r => r.currency, nameof(Row.currency), currency_filter, FilterType.Regex, ColWidth.Currency);
|
||||
add_col(ColKey.Volume, r => r.volume_text, nameof(Row.volume), volume_filter, FilterType.ULongMinMax, ColWidth.Volume);
|
||||
|
||||
// last
|
||||
@@ -387,6 +389,7 @@ namespace mbts.spark {
|
||||
internal OrdersModel orders_model => _orders_model;
|
||||
|
||||
public IDataGridColumnPersistentFilter<Row, string> security_filter { get; }
|
||||
public IDataGridColumnPersistentFilter<Row, string> currency_filter { get; }
|
||||
public IDataGridColumnPersistentFilter<Row, DoubleMinMaxState> bid_price_filter { get; } = new DoubleMinMax<Row>(r => r.bid_price, nameof(Row.bid_price));
|
||||
public IDataGridColumnPersistentFilter<Row, DoubleMinMaxState> bid_qty_filter { get; } = new DoubleMinMax<Row>(r => r.bid_qty_display, nameof(Row.bid_qty_display));
|
||||
public IDataGridColumnPersistentFilter<Row, DoubleMinMaxState> dbid_qty_filter { get; } = new DoubleMinMax<Row>(r => r.dbid_qty_display, nameof(Row.dbid_qty_display));
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
public const double
|
||||
Account = 62,
|
||||
CheckMark = 42,
|
||||
Currency = 54,
|
||||
Exchange = 66,
|
||||
FillKey = 68,
|
||||
OrderKey = 78,
|
||||
@@ -107,6 +108,7 @@
|
||||
AvgCost = "Avg Cost",
|
||||
AvgFilled = "Avg Filled",
|
||||
AttachedTargetOrderKey = "Attached Target Key",
|
||||
Currency = "Currency",
|
||||
Exchange = "Exchange",
|
||||
Expiration = "Exp",
|
||||
FillKey = "Fill Key",
|
||||
|
||||
Reference in new issue
Block a user