refactor: Convert ui cfg to proto3
This commit is contained in:
1 parent
3aaa25a3e8
commit
6c3c9ebbcb
36 files changed
+282
-257
No files matched your search
@@ -38,7 +38,7 @@ namespace bts.shell {
|
||||
|
||||
[ImportingConstructor]
|
||||
public OrderTicketDaemon(IBus bus, OrdersModel model, UserSettingsHub settings_hub, ErrorReporter error_reporter)
|
||||
: this(bus, model, settings_hub, error_reporter, Configuration.get<bts.config.OrderTicketOptions>().close_on_send) { }
|
||||
: this(bus, model, settings_hub, error_reporter, Configuration.get<bts.config.OrderTicketOptions>().CloseOnSend) { }
|
||||
|
||||
public OrderTicketDaemon(IBus bus, OrdersModel model, UserSettingsHub settings_hub, ErrorReporter error_reporter, bool close_on_send) {
|
||||
_bus = bus;
|
||||
|
||||
@@ -1,107 +1,113 @@
|
||||
using bts.api.core;
|
||||
using bts.metrics;
|
||||
|
||||
using mbts.config;
|
||||
using mbts.ui;
|
||||
|
||||
using Spark.Core.Disposables;
|
||||
|
||||
using System;
|
||||
using System.Composition;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bts.perf {
|
||||
[Export, Export(typeof(IShellDaemon))]
|
||||
class ShellLatencyDaemon : IShellDaemon, IDisposable {
|
||||
readonly ShellLatencyService _service;
|
||||
readonly string _hostname;
|
||||
readonly string _version;
|
||||
readonly string _username;
|
||||
IDisposable _subs;
|
||||
Ping _pinger = new Ping();
|
||||
|
||||
[ImportingConstructor]
|
||||
public ShellLatencyDaemon(ShellLatencyService service, Lazy<UserTuple> user) {
|
||||
_service = service;
|
||||
_version = Configuration.get<bts.config.SystemConfig>().Version;
|
||||
_username = user.Value.name;
|
||||
_hostname = Environment.MachineName;
|
||||
|
||||
_forever_ping_host(_pinger);
|
||||
_subs = Disposable.Create(
|
||||
_pinger,
|
||||
_service.subscribei_clock().Subscribe(on_tick)
|
||||
);
|
||||
}
|
||||
|
||||
void on_tick(Update<TickImmutable, int> update) {
|
||||
if (update.added.Any()) {
|
||||
var tick = update.added.Last();
|
||||
_service.report_async(new Report() {
|
||||
HostName = _hostname,
|
||||
Version = _version,
|
||||
User = _username,
|
||||
Timestamp = tick.Timestamp
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async void _forever_ping_host(Ping pinger) {
|
||||
var config = Configuration.get<bts.config.ShellPingOptions>();
|
||||
string server_ip = Configuration.get<bts.config.SystemConfig>().ConfigIp;
|
||||
int delay = config.workloop_milliseconds_interval;
|
||||
int _current_missed_ping_count = 0;
|
||||
|
||||
if (config.shell_ping_is_enabled && pinger != null) {
|
||||
while (true) {
|
||||
try {
|
||||
await Task.Delay(delay);
|
||||
var response = await pinger.SendPingAsync(server_ip, config.timeout_milliseconds_threshold);
|
||||
if (response.Status == IPStatus.Success) {
|
||||
_current_missed_ping_count = 0;
|
||||
if (response.RoundtripTime > config.logging_milliseconds_threshold) {
|
||||
Log.Ui.warn($"Ping response not received in a timely manner:\n" +
|
||||
$"\tAddress:\t{response.Address}\n" +
|
||||
$"\tRoundTrip:\t{response.RoundtripTime} ms");
|
||||
}
|
||||
// potentially reset delay to initial work period (no-op otherwise)
|
||||
delay = config.workloop_milliseconds_interval;
|
||||
} else {
|
||||
_current_missed_ping_count++;
|
||||
delay = _get_exp_delay(_current_missed_ping_count, config.workloop_milliseconds_interval, config.maximum_backoff_milliseconds);
|
||||
Log.Ui.warn($"Ping was not successful. Ping response: {response.Status}. Missed ping count: {_current_missed_ping_count}. Backing off for {delay} milliseconds.");
|
||||
}
|
||||
} catch (PingException e) {
|
||||
_current_missed_ping_count++;
|
||||
delay = _get_exp_delay(_current_missed_ping_count, config.workloop_milliseconds_interval, config.maximum_backoff_milliseconds);
|
||||
Log.Ui.error($"Ping exception. {e}\nBacking off for {delay} milliseconds.");
|
||||
}
|
||||
} // end while
|
||||
}
|
||||
|
||||
// since we're returning milliseconds here up to a 1 minute delay
|
||||
// we don't need to go crazy with the power, else we will get
|
||||
// an ArgumentOutOfRangeExecption.
|
||||
// Int.MaxValue = 2^31, so we need to be below that
|
||||
// Also, even if we're under the 2^31 int.maxvalue, we don't want to be multed over it
|
||||
// so that is why we have checked() here.
|
||||
int _get_exp_delay(int retry_num, int min_interval, int max_delay) {
|
||||
// add some jitter up to half the max delay so we don't
|
||||
// have a ping spike from all clients at once
|
||||
var jitter_amount = new Random().Next(max_delay / 2);
|
||||
int power_factor = (int)Math.Pow(2, Math.Min(retry_num, 32) - 1);
|
||||
try {
|
||||
return Math.Min(checked(min_interval * power_factor + jitter_amount), max_delay + jitter_amount);
|
||||
} catch (OverflowException) {
|
||||
return max_delay + jitter_amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Disposable.dispose(ref _subs);
|
||||
}
|
||||
}
|
||||
}
|
||||
using bts.api.core;
|
||||
using bts.metrics;
|
||||
|
||||
using mbts.config;
|
||||
using mbts.ui;
|
||||
|
||||
using Spark.Core.Disposables;
|
||||
|
||||
using System;
|
||||
using System.Composition;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bts.perf {
|
||||
[Export, Export(typeof(IShellDaemon))]
|
||||
class ShellLatencyDaemon : IShellDaemon, IDisposable {
|
||||
readonly ShellLatencyService _service;
|
||||
readonly string _hostname;
|
||||
readonly string _version;
|
||||
readonly string _username;
|
||||
IDisposable _subs;
|
||||
Ping _pinger = new Ping();
|
||||
|
||||
[ImportingConstructor]
|
||||
public ShellLatencyDaemon(ShellLatencyService service, Lazy<UserTuple> user) {
|
||||
_service = service;
|
||||
_version = Configuration.get<bts.config.SystemConfig>().Version;
|
||||
_username = user.Value.name;
|
||||
_hostname = Environment.MachineName;
|
||||
|
||||
_forever_ping_host(_pinger);
|
||||
_subs = Disposable.Create(
|
||||
_pinger,
|
||||
_service.subscribei_clock().Subscribe(on_tick)
|
||||
);
|
||||
}
|
||||
|
||||
void on_tick(Update<TickImmutable, int> update) {
|
||||
if (update.added.Any()) {
|
||||
var tick = update.added.Last();
|
||||
_service.report_async(new Report() {
|
||||
HostName = _hostname,
|
||||
Version = _version,
|
||||
User = _username,
|
||||
Timestamp = tick.Timestamp
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async void _forever_ping_host(Ping pinger) {
|
||||
var config = Configuration.get<bts.config.ShellPingOptions>();
|
||||
string server_ip = Configuration.get<bts.config.SystemConfig>().ConfigIp;
|
||||
int delay = config.WorkloopMillisecondsInterval;
|
||||
int _current_missed_ping_count = 0;
|
||||
|
||||
if (config.ShellPingIsEnabled && pinger != null) {
|
||||
while (true) {
|
||||
try {
|
||||
await Task.Delay(delay);
|
||||
var response = await pinger.SendPingAsync(server_ip, config.TimeoutMillisecondsThreshold);
|
||||
if (response.Status == IPStatus.Success) {
|
||||
_current_missed_ping_count = 0;
|
||||
if (response.RoundtripTime > config.LoggingMillisecondsThreshold) {
|
||||
Log.Ui.warn($"Ping response not received in a timely manner:\n" +
|
||||
$"\tAddress:\t{response.Address}\n" +
|
||||
$"\tRoundTrip:\t{response.RoundtripTime} ms");
|
||||
}
|
||||
// potentially reset delay to initial work period (no-op otherwise)
|
||||
delay = config.WorkloopMillisecondsInterval;
|
||||
} else {
|
||||
_current_missed_ping_count++;
|
||||
delay = _get_exp_delay(
|
||||
_current_missed_ping_count,
|
||||
config.WorkloopMillisecondsInterval,
|
||||
config.MaximumBackoffMilliseconds);
|
||||
Log.Ui.warn($"Ping was not successful. Ping response: {response.Status}. Missed ping count: {_current_missed_ping_count}. Backing off for {delay} milliseconds.");
|
||||
}
|
||||
} catch (PingException e) {
|
||||
_current_missed_ping_count++;
|
||||
delay = _get_exp_delay(
|
||||
_current_missed_ping_count,
|
||||
config.WorkloopMillisecondsInterval,
|
||||
config.MaximumBackoffMilliseconds);
|
||||
Log.Ui.error($"Ping exception. {e}\nBacking off for {delay} milliseconds.");
|
||||
}
|
||||
} // end while
|
||||
}
|
||||
|
||||
// since we're returning milliseconds here up to a 1 minute delay
|
||||
// we don't need to go crazy with the power, else we will get
|
||||
// an ArgumentOutOfRangeExecption.
|
||||
// Int.MaxValue = 2^31, so we need to be below that
|
||||
// Also, even if we're under the 2^31 int.maxvalue, we don't want to be multed over it
|
||||
// so that is why we have checked() here.
|
||||
int _get_exp_delay(int retry_num, int min_interval, int max_delay) {
|
||||
// add some jitter up to half the max delay so we don't
|
||||
// have a ping spike from all clients at once
|
||||
var jitter_amount = new Random().Next(max_delay / 2);
|
||||
int power_factor = (int)Math.Pow(2, Math.Min(retry_num, 32) - 1);
|
||||
try {
|
||||
return Math.Min(checked(min_interval * power_factor + jitter_amount), max_delay + jitter_amount);
|
||||
} catch (OverflowException) {
|
||||
return max_delay + jitter_amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Disposable.dispose(ref _subs);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
public override string window_type => WINDOW_TYPE;
|
||||
string ISharedWindow.thread_id =>
|
||||
config.Configuration.get<bts.config.MultiThreadedWindows>().vol_surface ? "VolSurface" : null;
|
||||
config.Configuration.get<bts.config.MultiThreadedWindows>().VolSurface ? "VolSurface" : null;
|
||||
|
||||
public int vs_id => _startup_data.id;
|
||||
public string vs_name { get; }
|
||||
|
||||
@@ -67,7 +67,8 @@ namespace mbts.spark {
|
||||
_settings_hub = settings_hub;
|
||||
_settings_manager = settings_hub.create_mview_settings_manager(state.grid);
|
||||
Icon.Freeze();
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().market_view ? "MarketView" : null;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().MarketView ?
|
||||
"MarketView" : null;
|
||||
_dispose = Disposable.Create(() => {
|
||||
Disposable.dispose(ref _subscriptions);
|
||||
_vm.Dispose();
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
public override Task<IShellWindow> load(TimeAndSalesSettings state) {
|
||||
var conf = Configuration.get<bts.config.TimeAndSalesOptions>();
|
||||
var thread_id = Configuration.get<bts.config.MultiThreadedWindows>().time_and_sales ?
|
||||
var thread_id = Configuration.get<bts.config.MultiThreadedWindows>().TimeAndSales ?
|
||||
TimeAndSalesWindow.WINDOW_TYPE_NAME : null;
|
||||
var settings_man = new WindowSettingsManager<GridSettings>(
|
||||
_settings_hub, state.grid, s => s.time_and_sales_grid, (s, g) => s.with(time_and_sales: g));
|
||||
@@ -54,7 +54,7 @@
|
||||
_consumer,
|
||||
state,
|
||||
settings_man,
|
||||
conf.can_pause_updates,
|
||||
conf.CanPauseUpdates,
|
||||
_security_auxiliary_model.get_display_quantity_divisor,
|
||||
thread_id);
|
||||
return Task.FromResult<IShellWindow>(win);
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace bts {
|
||||
static bool _is_hidden(IShellModule module) {
|
||||
var props = Configuration.get<IShellModuleProps>();
|
||||
string name = module.GetType().Name;
|
||||
foreach (var p in props.module) {
|
||||
if (p.name.ToLower() == name.ToLower()) {
|
||||
return !p.visible;
|
||||
foreach (var p in props.Module) {
|
||||
if (p.Name.ToLower() == name.ToLower()) {
|
||||
return !p.Visible;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace mbts.spark {
|
||||
_state = state;
|
||||
_settings_manager = settings_manager;
|
||||
Icon.Freeze();
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().synthetic_management ?
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().SyntheticManagement ?
|
||||
"SyntheticManagement" : null;
|
||||
_dispose = Disposable.Create(() => {
|
||||
Disposable.dispose(ref _vm);
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace mbts.spark {
|
||||
: base(NAME, bus, factory, SparkCommands.ShowAlgoStudio.icon) {
|
||||
_model = model;
|
||||
_state = state;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().algo_studio ? "AlgoStudio" : null;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().AlgoStudio ?
|
||||
"AlgoStudio" : null;
|
||||
_dispose = Disposable.Create(_dispose_core);
|
||||
}
|
||||
|
||||
@@ -74,12 +75,12 @@ namespace mbts.spark {
|
||||
_commands.Add(new SparkCommandCommand("Add Algo", Icons.AddBoxes, _vm.add_definition_cmd));
|
||||
_commands.Add(new SparkCommandCommand("Clone Algo", Icons.CopyBoxes, _vm.clone_selected_definition_cmd));
|
||||
_commands.Add(new SparkCommandCommand("Save Algo", Icons.DiskFile, _vm.save_cmd) {
|
||||
show_in_toolbar = _ui_configuration.can_save_specific
|
||||
show_in_toolbar = _ui_configuration.CanSaveSpecific
|
||||
});
|
||||
_commands.Add(new SparkCommandCommand("Save All", Icons.Disk, ObservantAsyncCommand.create(_vm.save_all, out var save_all_observer)));
|
||||
_resources.Add(_vm.subscribe_dirty().OnDispatcher().Subscribe(save_all_observer));
|
||||
// undo/redo
|
||||
if (_ui_configuration.can_undo_redo) {
|
||||
if (_ui_configuration.CanUndoRedo) {
|
||||
// undo
|
||||
var undo_cmd = new ObservantCommand(() => _vm.selected_definition?.try_undo());
|
||||
var undo_spark_cmd = new SparkCommandCommand("Undo", Icons.UndoCircular, undo_cmd);
|
||||
|
||||
@@ -17,10 +17,10 @@ namespace mbts.spark {
|
||||
static class AlgoStudioModelUtils {
|
||||
public static IReadOnlyDictionary<object, object> get_dynamic_resources(bts.config.AlgoStudioOptions ui_configuration) =>
|
||||
new Dictionary<object, object> {
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarRenameDefinitionKey, ui_configuration.can_modify_definition_name && ui_configuration.show_algo_toolbar_rename },
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarSaveDefinitionKey, ui_configuration.can_modify_definition_values && ui_configuration.show_algo_toolbar_save },
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarRevertDefinitionKey, ui_configuration.show_algo_toolbar_revert },
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarUndoRedoDefinitionKey, ui_configuration.show_algo_toolbar_undo_redo }
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarRenameDefinitionKey, ui_configuration.CanModifyDefinitionName && ui_configuration.ShowAlgoToolbarRename },
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarSaveDefinitionKey, ui_configuration.CanModifyDefinitionValues && ui_configuration.ShowAlgoToolbarSave },
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarRevertDefinitionKey, ui_configuration.ShowAlgoToolbarRevert },
|
||||
{ AlgoStudioWindow.ShowAlgoToolBarUndoRedoDefinitionKey, ui_configuration.ShowAlgoToolbarUndoRedo }
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -69,9 +69,9 @@ namespace mbts.spark {
|
||||
_permissions_mask.mask = init_permissions;
|
||||
_permissions_mask.raw = init_permissions;
|
||||
var resources = new List<IDisposable>();
|
||||
if (!model.algo_model.ui_configuration.can_modify_definition_values)
|
||||
if (!model.algo_model.ui_configuration.CanModifyDefinitionValues)
|
||||
editing_permissions_mask ^= (AlgoEditingPermissions.AllowEditValues | AlgoEditingPermissions.AllowSaveValues);
|
||||
if (!model.algo_model.ui_configuration.can_modify_definition_structure)
|
||||
if (!model.algo_model.ui_configuration.CanModifyDefinitionStructure)
|
||||
editing_permissions_mask ^= (AlgoEditingPermissions.AllowEditStructure | AlgoEditingPermissions.AllowSaveStructure);
|
||||
key = def_data.key;
|
||||
algos_view = ObservableAutoWrapper.create_sorted_wrapper(_algo_roots, AlgoCollectionHelper.algo_vm_comparer);
|
||||
@@ -132,7 +132,11 @@ namespace mbts.spark {
|
||||
case AlgoKey.Mode.Persisted:
|
||||
_metadata = new AlgoDefinitionMetadata(key);
|
||||
resources.Add(model.algo_model.metadata_service.subscribe_metadata(key).OnDispatcher().Subscribe(_on_metadata));
|
||||
_edit_pane_vs_model.set_state(VisualStateNames.Name.GroupName, conf.can_modify_definition_name ? VisualStateNames.Name.Active : VisualStateNames.Name.CannotRenameDefinition);
|
||||
_edit_pane_vs_model.set_state(
|
||||
VisualStateNames.Name.GroupName,
|
||||
conf.CanModifyDefinitionName ?
|
||||
VisualStateNames.Name.Active :
|
||||
VisualStateNames.Name.CannotRenameDefinition);
|
||||
break;
|
||||
case AlgoKey.Mode.Factory:
|
||||
_edit_pane_vs_model.set_state(VisualStateNames.Name.GroupName, VisualStateNames.Name.Inactive);
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Spark.Trading {
|
||||
IWindowSettingsManager<GridSettings> settings_manager,
|
||||
UserTuple user)
|
||||
: base(WINDOW_TITLE, bus, save, Icons.DayFills) {
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().day_fills ?
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().DayFills ?
|
||||
WINDOW_TYPE_NAME : null;
|
||||
_position_model = position_model;
|
||||
_security_metadata = security_metadata;
|
||||
|
||||
@@ -40,7 +40,8 @@ namespace mbts.spark {
|
||||
_orders_model = orders_model;
|
||||
_state = state;
|
||||
_settings_manager = settings_manager;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().fills ? "Fills" : null;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().Fills ?
|
||||
"Fills" : null;
|
||||
_dispose = Disposable.Create(() => {
|
||||
if (_commands != null) {
|
||||
_commands.OfType<IDisposable>().DisposeAll();
|
||||
|
||||
@@ -573,7 +573,7 @@ namespace mbts.spark {
|
||||
|
||||
static LadderSettings() {
|
||||
var knobs = config.Configuration.get<bts.config.LadderKnobs>();
|
||||
mimic_tt = knobs.mimic_tt;
|
||||
mimic_tt = knobs.MimicTt;
|
||||
}
|
||||
|
||||
// Default proto constructor
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
_sec_meta_store = sec_meta_store;
|
||||
_ladder_conf = new LadderConfig(
|
||||
Configuration.get<bts.config.LadderKnobs>(),
|
||||
Configuration.get<bts.config.MultiThreadedWindows>().ladder);
|
||||
Configuration.get<bts.config.MultiThreadedWindows>().Ladder);
|
||||
_thread_id_provider = ShellWindowThreadIDFactory.create(_window_type, _ladder_conf.ladders_on_threads);
|
||||
_mbo = mbo;
|
||||
_dispose = Disposable.Create(
|
||||
@@ -117,10 +117,10 @@
|
||||
public readonly TimeSpan security_timeout;
|
||||
|
||||
public LadderConfig(bts.config.LadderKnobs knobs, bool ladders_on_threads) {
|
||||
max_open_ladders = knobs.max_open_ladders;
|
||||
open_algo_popup_on_select = knobs.open_algo_popup_on_select;
|
||||
use_algo_param_grid = knobs.use_algo_param_grid;
|
||||
security_timeout = TimeSpan.FromSeconds(Math.Max(15, knobs.security_timeout_secs));
|
||||
max_open_ladders = knobs.MaxOpenLadders;
|
||||
open_algo_popup_on_select = knobs.OpenAlgoPopupOnSelect;
|
||||
use_algo_param_grid = knobs.UseAlgoParamGrid;
|
||||
security_timeout = TimeSpan.FromSeconds(Math.Max(15, knobs.SecurityTimeoutSecs));
|
||||
this.ladders_on_threads = ladders_on_threads;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,16 +103,18 @@ namespace mbts.spark {
|
||||
|
||||
static LadderGridHost() {
|
||||
var knobs = config.Configuration.get<bts.config.LadderKnobs>();
|
||||
_show_scrollbar = knobs.show_scrollbar;
|
||||
_lighten_market_cells = knobs.lighten_market_cells;
|
||||
_initial_row_count = (int)knobs.scrollable_tick_window_size;
|
||||
_show_scrollbar = knobs.ShowScrollbar;
|
||||
_lighten_market_cells = knobs.LightenMarketCells;
|
||||
_initial_row_count = (int)knobs.ScrollableTickWindowSize;
|
||||
// For market cell backgrounds, 0 means null. Note that the full
|
||||
// range of colors can still be expressed, as zero is merely one of
|
||||
// 2^24 possible representations of 'transparent.'
|
||||
if (knobs.bid_market_cell_background != 0)
|
||||
if (knobs.BidMarketCellBackground != 0) {
|
||||
_bid_market_cell_background = BTSColors.Ladder.bid_column_background;
|
||||
if (knobs.ask_market_cell_background != 0)
|
||||
}
|
||||
if (knobs.AskMarketCellBackground != 0) {
|
||||
_ask_market_cell_background = BTSColors.Ladder.ask_column_background;
|
||||
}
|
||||
}
|
||||
|
||||
public LadderGridHost() {
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace mbts.spark {
|
||||
|
||||
static LadderView() {
|
||||
var knobs = config.Configuration.get<bts.config.LadderKnobs>();
|
||||
MimicTT = knobs.mimic_tt;
|
||||
MimicTT = knobs.MimicTt;
|
||||
}
|
||||
|
||||
public static bool MimicTT { get; }
|
||||
|
||||
@@ -54,9 +54,9 @@ namespace Spark.Trading {
|
||||
public bool modal_transactions { get; }
|
||||
|
||||
public static ManualFillsConfig read() => new(
|
||||
mbts.config.Configuration.get<bts.config.MultiThreadedWindows>().manual_fills ?
|
||||
mbts.config.Configuration.get<bts.config.MultiThreadedWindows>().ManualFills ?
|
||||
ManualFillsWindow.WINDOW_TYPE_NAME : null,
|
||||
mbts.config.Configuration.get<bts.config.ManualFillsOptions>().modal_transactions);
|
||||
mbts.config.Configuration.get<bts.config.ManualFillsOptions>().ModalTransactions);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace Spark.Trading {
|
||||
OpenOrdersSettings settings,
|
||||
IWindowSettingsManager<GridSettings> settings_manager)
|
||||
: base(WINDOW_TITLE, bus, save, Icons.open_orders) {
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().open_orders ?
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().OpenOrders ?
|
||||
WINDOW_TYPE_NAME : null;
|
||||
_orders_model = orders_model;
|
||||
_security_metadata = security_metadata;
|
||||
|
||||
@@ -1342,7 +1342,8 @@ namespace mbts.spark {
|
||||
Brushes.Transparent :
|
||||
BTSColors.Orders.working_order_background);
|
||||
|
||||
static readonly bool _animate_child_order_rows = mbts.config.Configuration.get<bts.config.OrderBookOptions>().animate_child_order_rows;
|
||||
static readonly bool _animate_child_order_rows =
|
||||
mbts.config.Configuration.get<bts.config.OrderBookOptions>().AnimateChildOrderRows;
|
||||
|
||||
public static BindingBase _get_background_binding() {
|
||||
var mb = new MultiBinding { Converter = _background_converter };
|
||||
|
||||
@@ -1050,11 +1050,11 @@ namespace mbts.spark {
|
||||
var top = config.Configuration.get<bts.config.TopAttachUIOptions>();
|
||||
var offset = config.Configuration.get<bts.config.OffsetAttachUIOptions>();
|
||||
_algo_type_conf = new Dictionary<CustomOrderDefinition.CustomOneofCase, (bool, bool)> {
|
||||
{ CustomOrderDefinition.CustomOneofCase.Cover, (cover.show_price, cover.show_quantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Join, (join.show_price, join.show_quantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Lean, (lean.show_price, lean.show_quantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Top, (top.show_price, top.show_quantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Offset, (offset.show_price, offset.show_quantity) }
|
||||
{ CustomOrderDefinition.CustomOneofCase.Cover, (cover.ShowPrice, cover.ShowQuantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Join, (join.ShowPrice, join.ShowQuantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Lean, (lean.ShowPrice, lean.ShowQuantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Top, (top.ShowPrice, top.ShowQuantity) },
|
||||
{ CustomOrderDefinition.CustomOneofCase.Offset, (offset.ShowPrice, offset.ShowQuantity) }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,8 @@ namespace mbts.spark {
|
||||
_state = state;
|
||||
_settings_manager = settings_manager;
|
||||
_can_edit_specific_algo_params = can_edit_specific_algo_params;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().order_book ? "OrderBook" : null;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().OrderBook ?
|
||||
"OrderBook" : null;
|
||||
_dispose = Disposable.Create(() => {
|
||||
_thread_init_resources.DisposeAll(true);
|
||||
Disposable.dispose(ref _attachment_exit_sub);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace bts.shell {
|
||||
ISecurityMetadataStore sec_meta_store,
|
||||
UserSettingsHub settings_hub) : base(owner, "SparkOrderBookWindow") {
|
||||
var raw_config = Configuration.get<bts.config.OrderBookOptions>();
|
||||
_config = new OrderBookConfig(raw_config.can_edit_specific_algo_params);
|
||||
_config = new OrderBookConfig(raw_config.CanEditSpecificAlgoParams);
|
||||
_bus = bus;
|
||||
_notification_service = notification_service;
|
||||
_notification_service_data_cache = notification_service_data_cache;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace mbts.spark {
|
||||
var bg_binding = new MultiBinding();
|
||||
bg_binding.Bindings.Add(new Binding(nameof(OrderBookRowVM.status)));
|
||||
bg_binding.Bindings.Add(new Binding(nameof(ListBoxItem.IsSelected)) { RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(ListBoxItem), 1) });
|
||||
double overlay_opacity = config.Configuration.get<bts.config.OrderBookOptions>().status_color_opacity_when_selected;
|
||||
double overlay_opacity = config.Configuration.get<bts.config.OrderBookOptions>().StatusColorOpacityWhenSelected;
|
||||
if (overlay_opacity > 0.1 && overlay_opacity < 0.9) {
|
||||
bg_binding.Converter = ValueConverter.create<OrderStatus, bool, Brush>((status, is_selected) => {
|
||||
var color = _status_color(status);
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace bts.shell {
|
||||
_settings = settings;
|
||||
_pnl_conf = pnl_conf ?? new(Configuration.get<bts.config.PNLOptions>());
|
||||
int window_id = Interlocked.Increment(ref _window_id_counter);
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().pnl ?
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().Pnl ?
|
||||
WINDOW_TYPE : null;
|
||||
_logger = new LoggerContext(Log.Ui, $"[{WINDOW_TYPE}_{window_id}] ", null);
|
||||
_dispose = Disposable.Create(dispose);
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace bts.shell {
|
||||
_position_model = position_model;
|
||||
_sec_meta_store = sec_meta_store;
|
||||
_pnl_conf = new PNLConfig(Configuration.get<bts.config.PNLOptions>());
|
||||
_thread_id_provider = ShellWindowThreadIDFactory.create(_window_type, Configuration.get<bts.config.MultiThreadedWindows>().pnl);
|
||||
_thread_id_provider = ShellWindowThreadIDFactory.create(_window_type, Configuration.get<bts.config.MultiThreadedWindows>().Pnl);
|
||||
_dispose = bus.subscribe(SparkTags.ShowPNLTag).OnDispatcher().Subscribe(_show);
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ namespace bts.shell {
|
||||
show_pause_resume;
|
||||
|
||||
public PNLConfig(bts.config.PNLOptions options) {
|
||||
enable_animations = options.enable_animations;
|
||||
show_pause_resume = options.show_pause_resume;
|
||||
enable_animations = options.EnableAnimations;
|
||||
show_pause_resume = options.ShowPauseResume;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Spark.Trading {
|
||||
IWindowSettingsManager<GridSettings> settings_manager,
|
||||
UserTuple user)
|
||||
: base("Reconcile Report", bus, save, Icons.Reports) {
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().reconcile_report ?
|
||||
thread_id = Configuration.get<bts.config.MultiThreadedWindows>().ReconcileReport ?
|
||||
WINDOW_TYPE_NAME : null;
|
||||
_position_model = position_model;
|
||||
_security_metadata = security_metadata;
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
class OrderSentEventPredicate : IEquatable<OrderSentEventPredicate> {
|
||||
static readonly int _type_hash = typeof(OrderSentEventPredicate).GetHashCode();
|
||||
// arbitrary short time period (can override in config)
|
||||
static readonly TimeSpan _stale_order_threshold = TimeSpan.FromSeconds(config.Configuration.get<bts.config.OrderAlerts>().stale_order_threshold_seconds);
|
||||
static readonly TimeSpan _stale_order_threshold = TimeSpan.FromSeconds(
|
||||
config.Configuration.get<bts.config.OrderAlerts>().StaleOrderThresholdSeconds);
|
||||
|
||||
public enum PredicateTypeOneofCase {
|
||||
[Description("(any order)")]
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace mbts.analytics {
|
||||
IBus bus, ISaveWindow<ComboReportSettings> save,
|
||||
ComboReportSettings settings)
|
||||
: base(settings.id.ToString(), bus, save, Icons.Reports) {
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().combo_report ?
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().ComboReport ?
|
||||
"Combo" : null;
|
||||
_settings = settings;
|
||||
_dispose = Disposable.Create(() => (_vm, _model));
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace mbts.analytics {
|
||||
ISaveWindow<SlideReportSettings> save,
|
||||
SlideReportSettings settings)
|
||||
: base(settings.id.ToString(), bus, save, Icons.Reports) {
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().slide_report ? "Slide" : null;
|
||||
thread_id = config.Configuration.get<bts.config.MultiThreadedWindows>().SlideReport ? "Slide" : null;
|
||||
_settings = settings;
|
||||
_dispose = Disposable.Create(() => Disposable.dispose(ref _vm));
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace mbts.spark {
|
||||
|
||||
public SecurityAuxiliaryDataModel() {
|
||||
var sym_config = Configuration.get<bts.config.SymbolUIConfiguration>();
|
||||
var sym_config_items = Configuration.get<bts.config.SymbolUIConfiguration>().items;
|
||||
var sym_config_items = Configuration.get<bts.config.SymbolUIConfiguration>().Items;
|
||||
foreach (var item in sym_config_items)
|
||||
_auxiliary_data[item.symbol] = new SecurityAuxiliaryData(item.display_quantity_divisor);
|
||||
_auxiliary_data[item.Symbol] = new SecurityAuxiliaryData(item.DisplayQuantityDivisor);
|
||||
}
|
||||
|
||||
public SecurityAuxiliaryData? get_auxiliary_data(SecurityImmutable security) =>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
public override void CreateShell(ShellModel model) {
|
||||
if (Configuration.get<bts.config.ShellRenderMode>().software_only) {
|
||||
if (Configuration.get<bts.config.ShellRenderMode>().SoftwareOnly) {
|
||||
System.Windows.Media.RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace mbts.ui.shell {
|
||||
}
|
||||
|
||||
public async void save_workspace_periodically() {
|
||||
TimeSpan interval = TimeSpan.FromSeconds(Configuration.get<bts.config.ShellSettingsConfig>().save_timer);
|
||||
TimeSpan interval = TimeSpan.FromSeconds(Configuration.get<bts.config.ShellSettingsConfig>().SaveTimer);
|
||||
await Task.Delay(interval);
|
||||
while (!_closing) {
|
||||
var workspace = await get_workspace_async();
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace mbts.spark {
|
||||
#region static
|
||||
public static readonly MBOSecurityQueryImmutable default_query = (MBOSecurityQueryImmutable)
|
||||
new MBOSecurityQuery {
|
||||
Limit = Configuration.get<bts.config.LadderKnobs>().max_mbo_orders
|
||||
Limit = Configuration.get<bts.config.LadderKnobs>().MaxMboOrders
|
||||
};
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace mbts.spark {
|
||||
|
||||
static WorkLoop() {
|
||||
var timer_params = config.Configuration.get<bts.config.LadderKnobs>();
|
||||
default_priority = Enum.TryParse(timer_params.priority, true, out DispatcherPriority p) ? p : DispatcherPriority.ApplicationIdle;
|
||||
default_interval = TimeSpan.FromMilliseconds(timer_params.interval_ms);
|
||||
default_priority = Enum.TryParse(timer_params.Priority, true, out DispatcherPriority p) ? p : DispatcherPriority.ApplicationIdle;
|
||||
default_interval = TimeSpan.FromMilliseconds(timer_params.IntervalMs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
<Proto3 Include="../../lib/config/protos/toggles.proto">
|
||||
<OutCS>$(ProtoOutputPath)/lib/config/protos/Toggles.cs</OutCS>
|
||||
</Proto3>
|
||||
<Proto3 Include="../../lib/config/protos/ui.proto">
|
||||
<OutCS>$(ProtoOutputPath)/lib/config/protos/Ui.cs</OutCS>
|
||||
</Proto3>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -87,6 +90,7 @@
|
||||
<ExcludedFiles Include="../../lib/config/protos/testkeys.proto" />
|
||||
<ExcludedFiles Include="../../lib/config/protos/threads.proto" />
|
||||
<ExcludedFiles Include="../../lib/config/protos/toggles.proto" />
|
||||
<ExcludedFiles Include="../../lib/config/protos/ui.proto" />
|
||||
</ItemGroup>
|
||||
<Exclude Text="@(ExcludedFiles, ';')" />
|
||||
</Proto2>
|
||||
|
||||
@@ -1,64 +1,67 @@
|
||||
syntax = 'proto2';
|
||||
syntax = "proto3";
|
||||
|
||||
package bts.config;
|
||||
|
||||
option csharp_namespace = "bts.config";
|
||||
|
||||
message Shell {
|
||||
repeated string modules = 1;
|
||||
}
|
||||
|
||||
message ShellSettingsConfig {
|
||||
// Save the UI state every 5 minutes by default
|
||||
optional uint32 save_timer = 1 [ default = 300 ];
|
||||
uint32 save_timer = 1;
|
||||
}
|
||||
|
||||
message ShellRenderMode {
|
||||
optional bool software_only = 1 [ default = false ];
|
||||
bool software_only = 1;
|
||||
}
|
||||
|
||||
message ModuleProps {
|
||||
string name = 1;
|
||||
bool visible = 2;
|
||||
}
|
||||
|
||||
message IShellModuleProps {
|
||||
message ModuleProps {
|
||||
optional string name = 1;
|
||||
optional bool visible = 2 [ default = true ];
|
||||
}
|
||||
|
||||
repeated ModuleProps module = 1;
|
||||
}
|
||||
|
||||
message GridSettings {
|
||||
optional string font_family = 1 [ default = "Calibri" ];
|
||||
optional float font_size = 2 [ default = 10 ];
|
||||
optional string locale = 3 [ default = "en-us" ];
|
||||
string font_family = 1;
|
||||
float font_size = 2;
|
||||
string locale = 3;
|
||||
|
||||
optional uint32 row_height = 10 [ default = 16 ];
|
||||
optional uint32 col_width = 11 [ default = 75 ];
|
||||
uint32 row_height = 10;
|
||||
uint32 col_width = 11;
|
||||
|
||||
// Default grid colors
|
||||
optional uint32 color_background = 20 [ default = 0xFFFFFF ]; // White
|
||||
optional uint32 color_foreground = 21 [ default = 0 ]; // Black
|
||||
optional uint32 color_grid_line = 22 [ default = 0x778899 ]; // LightSlateGray
|
||||
uint32 color_background = 20;
|
||||
uint32 color_foreground = 21;
|
||||
uint32 color_grid_line = 22;
|
||||
}
|
||||
|
||||
message ShellLimits {
|
||||
optional bool kill_on_close = 1 [ default = true ];
|
||||
optional uint64 limit_memory_mb = 2;
|
||||
optional uint64 limit_group_memory_mb = 3;
|
||||
bool kill_on_close = 1;
|
||||
uint64 limit_memory_mb = 2;
|
||||
uint64 limit_group_memory_mb = 3;
|
||||
}
|
||||
|
||||
message MultiThreadedWindows {
|
||||
optional bool market_view = 1 [ default = true ];
|
||||
optional bool time_and_sales = 2 [ default = true ];
|
||||
optional bool order_book = 3 [ default = true ];
|
||||
optional bool fills = 4 [ default = true ];
|
||||
optional bool manual_fills = 9 [ default = true ];
|
||||
optional bool pnl = 5 [ default = true ];
|
||||
optional bool algo_studio = 6 [ default = true ];
|
||||
optional bool ladder = 7 [ default = true ];
|
||||
optional bool synthetic_management = 8 [ default = true ];
|
||||
optional bool vol_surface = 10 [ default = true ];
|
||||
optional bool slide_report = 11 [ default = true ];
|
||||
optional bool combo_report = 12 [ default = true ];
|
||||
optional bool reconcile_report = 13 [ default = true ];
|
||||
optional bool day_fills = 14 [ default = true ];
|
||||
optional bool open_orders = 15 [ default = true ];
|
||||
bool market_view = 1;
|
||||
bool time_and_sales = 2;
|
||||
bool order_book = 3;
|
||||
bool fills = 4;
|
||||
bool manual_fills = 9;
|
||||
bool pnl = 5;
|
||||
bool algo_studio = 6;
|
||||
bool ladder = 7;
|
||||
bool synthetic_management = 8;
|
||||
bool vol_surface = 10;
|
||||
bool slide_report = 11;
|
||||
bool combo_report = 12;
|
||||
bool reconcile_report = 13;
|
||||
bool day_fills = 14;
|
||||
bool open_orders = 15;
|
||||
}
|
||||
|
||||
message LadderKnobs {
|
||||
@@ -68,18 +71,18 @@ message LadderKnobs {
|
||||
//
|
||||
// It seems like all priorities
|
||||
// higher than ApplicationIdle choke the main thread.
|
||||
optional string priority = 1 [ default = "ApplicationIdle" ];
|
||||
optional double interval_ms = 2 [ default = 100 ];
|
||||
optional uint32 seconds_to_recenter = 3 [ default = 300 ];
|
||||
optional uint32 max_open_ladders = 4 [ default = 75 ];
|
||||
optional uint32 security_timeout_secs = 5 [ default = 60 ];
|
||||
optional bool open_algo_popup_on_select = 6 [ default = false ];
|
||||
optional bool use_algo_param_grid = 7 [ default = true ];
|
||||
optional uint32 max_mbo_orders = 8 [ default = 200 ];
|
||||
optional bool show_scrollbar = 9 [ default = false ];
|
||||
string priority = 1;
|
||||
double interval_ms = 2;
|
||||
uint32 seconds_to_recenter = 3;
|
||||
uint32 max_open_ladders = 4;
|
||||
uint32 security_timeout_secs = 5;
|
||||
bool open_algo_popup_on_select = 6;
|
||||
bool use_algo_param_grid = 7;
|
||||
uint32 max_mbo_orders = 8;
|
||||
bool show_scrollbar = 9;
|
||||
// DJ wants bid/ask cells with markets (i.e., size > 0) to have a
|
||||
// lighter background than those without markets.
|
||||
optional bool lighten_market_cells = 10 [ default = true ];
|
||||
bool lighten_market_cells = 10;
|
||||
|
||||
// For market cell backgrounds, 0 means 'ignore this color setting' (i.e.,
|
||||
// employ the ladder's default behavior instead).
|
||||
@@ -94,54 +97,54 @@ message LadderKnobs {
|
||||
// Pure Red : 0xFFFF0000
|
||||
// Pure Blue : 0xFF00FF00
|
||||
// Pure Green : 0xFF0000FF
|
||||
optional uint32 bid_market_cell_background = 11;
|
||||
optional uint32 ask_market_cell_background = 12;
|
||||
optional bool mimic_tt = 13 [ default = true ];
|
||||
uint32 bid_market_cell_background = 11;
|
||||
uint32 ask_market_cell_background = 12;
|
||||
bool mimic_tt = 13;
|
||||
// Defines the number of price rows rendered by the ladder. The smaller this
|
||||
// window is, the cheaper it is to render the ladder grid (redraw prices,
|
||||
// sizes, etc.). However, if the window is too small, scrolling may appear
|
||||
// choppy.
|
||||
optional uint32 scrollable_tick_window_size = 14 [ default = 256 ];
|
||||
uint32 scrollable_tick_window_size = 14;
|
||||
}
|
||||
|
||||
message OrderBookOptions {
|
||||
optional bool animate_child_order_rows = 1 [ default = false ];
|
||||
optional double status_color_opacity_when_selected = 2 [ default = 0.35 ];
|
||||
optional bool can_edit_specific_algo_params = 3 [ default = false ];
|
||||
bool animate_child_order_rows = 1;
|
||||
double status_color_opacity_when_selected = 2;
|
||||
bool can_edit_specific_algo_params = 3;
|
||||
}
|
||||
|
||||
message OrderTicketOptions {
|
||||
optional bool close_on_send = 1 [ default = true ];
|
||||
bool close_on_send = 1;
|
||||
}
|
||||
|
||||
message OrderAlerts {
|
||||
// When the client sees an order for the first time, this time period is used
|
||||
// to determine if the order is actually new, or [presumably]just arrived bc
|
||||
// shell is still initializing, or the server restarted.
|
||||
optional int32 stale_order_threshold_seconds = 1 [ default = 60 ];
|
||||
int32 stale_order_threshold_seconds = 1;
|
||||
}
|
||||
|
||||
message ShellPingOptions {
|
||||
optional bool shell_ping_is_enabled = 1 [ default = true ];
|
||||
optional int32 workloop_milliseconds_interval = 2 [ default = 5000 ];
|
||||
bool shell_ping_is_enabled = 1;
|
||||
int32 workloop_milliseconds_interval = 2;
|
||||
// 4000 is default Windows ping timeout as specified here:
|
||||
// https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490968(v=technet.10)
|
||||
optional int32 timeout_milliseconds_threshold = 3 [ default = 4000 ];
|
||||
optional int32 logging_milliseconds_threshold = 4 [ default = 50 ];
|
||||
optional int32 maximum_backoff_milliseconds = 5 [ default = 60000 ];
|
||||
int32 timeout_milliseconds_threshold = 3;
|
||||
int32 logging_milliseconds_threshold = 4;
|
||||
int32 maximum_backoff_milliseconds = 5;
|
||||
}
|
||||
|
||||
message PNLOptions {
|
||||
optional bool show_new_pnl = 1 [ default = true ];
|
||||
optional bool show_old_pnl = 2 [ default = false ];
|
||||
optional bool show_pause_resume = 3 [ default = false ];
|
||||
optional bool enable_animations = 4 [ default = false ];
|
||||
bool show_new_pnl = 1;
|
||||
bool show_old_pnl = 2;
|
||||
bool show_pause_resume = 3;
|
||||
bool enable_animations = 4;
|
||||
}
|
||||
|
||||
message TimeAndSalesOptions {
|
||||
// Adds a 'pause/resume updates' toggle button to the spark menu if set to
|
||||
// true. This may be helpful when debugging, or diagnosing problems.
|
||||
optional bool can_pause_updates = 1 [ default = false ];
|
||||
bool can_pause_updates = 1;
|
||||
}
|
||||
|
||||
message AlgoStudioOptions {
|
||||
@@ -150,62 +153,62 @@ message AlgoStudioOptions {
|
||||
DefinitionsAndTemplates = 1;
|
||||
}
|
||||
|
||||
optional bool can_modify_definition_name = 1 [ default = true ];
|
||||
optional bool can_modify_definition_values = 2 [ default = true ];
|
||||
optional bool can_modify_definition_structure = 3 [ default = true ];
|
||||
optional bool can_save_specific = 4 [ default = false ];
|
||||
optional bool can_undo_redo = 5 [ default = false ];
|
||||
bool can_modify_definition_name = 1;
|
||||
bool can_modify_definition_values = 2;
|
||||
bool can_modify_definition_structure = 3;
|
||||
bool can_save_specific = 4;
|
||||
bool can_undo_redo = 5;
|
||||
|
||||
// Props below are vestiges from the algo 'template' model in the original
|
||||
// spec (as opposed to the 'flat' definition model used now).
|
||||
// -------------------------------------------------------------------
|
||||
// optional bool include_custom_templates = 6 [default = true];
|
||||
// optional bool include_legacy_custom_templates = 7 [default = true];
|
||||
// optional bool show_badges_in_tree_view = 8 [default = false];
|
||||
// optional AddTemplateButton add_template_button = 9 [default = None];
|
||||
// optional ModelType model_type = 10 [default = FlatDefinitions];
|
||||
// bool include_custom_templates = 6 [default = true];
|
||||
// bool include_legacy_custom_templates = 7 [default = true];
|
||||
// bool show_badges_in_tree_view = 8 [default = false];
|
||||
// AddTemplateButton add_template_button = 9 [default = None];
|
||||
// ModelType model_type = 10 [default = FlatDefinitions];
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
optional bool show_algo_toolbar_rename = 11 [ default = false ];
|
||||
optional bool show_algo_toolbar_revert = 12 [ default = false ];
|
||||
optional bool show_algo_toolbar_save = 13 [ default = false ];
|
||||
optional bool show_algo_toolbar_undo_redo = 14 [ default = false ];
|
||||
bool show_algo_toolbar_rename = 11;
|
||||
bool show_algo_toolbar_revert = 12;
|
||||
bool show_algo_toolbar_save = 13;
|
||||
bool show_algo_toolbar_undo_redo = 14;
|
||||
}
|
||||
|
||||
// TODO: The following algo-type specific attach ui messages should be
|
||||
// consolidated into a single location, along with other algo-type metadata.
|
||||
message CoverAttachUIOptions {
|
||||
optional bool show_price = 1 [ default = false ];
|
||||
optional bool show_quantity = 2 [ default = false ];
|
||||
bool show_price = 1;
|
||||
bool show_quantity = 2;
|
||||
}
|
||||
|
||||
message JoinAttachUIOptions {
|
||||
optional bool show_price = 1 [ default = false ];
|
||||
optional bool show_quantity = 2 [ default = false ];
|
||||
bool show_price = 1;
|
||||
bool show_quantity = 2;
|
||||
}
|
||||
|
||||
message LeanAttachUIOptions {
|
||||
optional bool show_price = 1 [ default = false ];
|
||||
optional bool show_quantity = 2 [ default = false ];
|
||||
bool show_price = 1;
|
||||
bool show_quantity = 2;
|
||||
}
|
||||
|
||||
message TopAttachUIOptions {
|
||||
optional bool show_price = 1 [ default = false ];
|
||||
optional bool show_quantity = 2 [ default = false ];
|
||||
bool show_price = 1;
|
||||
bool show_quantity = 2;
|
||||
}
|
||||
|
||||
message OffsetAttachUIOptions {
|
||||
optional bool show_price = 1 [ default = false ];
|
||||
optional bool show_quantity = 2 [ default = false ];
|
||||
bool show_price = 1;
|
||||
bool show_quantity = 2;
|
||||
}
|
||||
|
||||
message ManualFillsOptions {
|
||||
optional bool modal_transactions = 1 [ default = true ];
|
||||
bool modal_transactions = 1;
|
||||
}
|
||||
|
||||
message SymbolUIConfigurationItem {
|
||||
optional string symbol = 1 [ default = "" ];
|
||||
optional uint32 display_quantity_divisor = 2 [ default = 1 ];
|
||||
string symbol = 1;
|
||||
uint32 display_quantity_divisor = 2;
|
||||
}
|
||||
|
||||
message SymbolUIConfiguration {
|
||||
|
||||
Reference in new issue
Block a user