Compare commits

..
Author SHA1 Message Date
John Colvin d6c25e9ad9 fix build: Fix compiler warnings after integrating Catch2 into build 2022-10-11 23:19:47 -04:00
John Colvin 62684fde2d Replace Catch2 in externals w/ CPM pkg 2022-10-11 23:19:47 -04:00
John Colvin 09fc44c7fc build: Replace quickfix in externals w/ cmake ExternalProject 2022-10-11 23:19:47 -04:00
John Colvin 1f1ec7d77d build: Replace curl in externals w/ CPM pkg 2022-10-11 23:19:47 -04:00
John Colvin b3fc4250c3 build: Replace pugixml in externals w/ CPM pkg 2022-10-11 23:19:47 -04:00
John Colvin 8784727e09 build: Replace cli11 in externals w/ CPM pkg 2022-10-11 23:19:47 -04:00
John Colvin 576fd34429 build: Replace several external libs w/ CPM pkgs
These replace include files/libs previously tracked in externals

* absl
* benchmark
* ccapi
* concurrentqueue
* date
* double-conversion
* fmt
* json
* range-v3
* readerwriterqueue
* rxcpp
* websocketpp
2022-10-11 23:19:47 -04:00
John Colvin 4d7119e265 build (refactor): Sort link_libraries alphabetically 2022-10-11 23:19:47 -04:00
John Colvin 68509161b0 Update externals to get emumba 3.2.0 2022-10-11 23:19:47 -04:00
John Colvin f8d356e32e Update docker/linux for ubuntu 22.10 image 2022-10-11 23:19:47 -04:00
John Colvin 16dd06d5e1 build: Replace setup_builds w/ CMakePresets.json
Clean up CMakeLists a bit in the process:
   * Define more cmake vars in CMakePresets
   * Split linux/windows presets into separate files
2022-10-11 23:19:47 -04:00
John Colvin fc15424a67 build (sparkd): Automatically create py venv in build script 2022-10-11 23:19:47 -04:00
John Colvin e30842beda build (sparkd): Pipe 'eval' cmd stdout/err back to shell
So we can actually see the build output
2022-10-11 23:19:47 -04:00
John Colvin 4e9d3e7152 fix build: Compile with gcc/g++ (version agnostic)
We don't really need a strict dependency on a compiler version, though
best practice is to use the latest gcc (12).
2022-10-11 23:19:47 -04:00
John Colvin 92152a3d06 tools (log): Fix 'pretty' script & rename 'show_last_run' 2022-10-11 23:19:47 -04:00
John Colvin 69e8953f0f fix build (gcc): Disable warning stringop-overread
This warning (as error) was introduced with g++ 12
2022-10-11 23:19:47 -04:00
John Colvin 6040f37a7e diag: Log emumba cfg parse error code 2022-10-11 23:19:47 -04:00
John Colvin 912bda2aeb refactor: Include <limits> in sane_algorithm.h
Although the build was fine, many methods in this header file depend on 'limits'
so it is appropriate to include it. Presumably all references to such methods are
made from source files that include <limits> by coincidence.
2022-10-11 23:19:47 -04:00
John Colvin ccff870b23 fix build (gcc): Don't let switch case fall through
Even if the case is simply 'bts_assert(false)'
2022-10-11 23:19:47 -04:00
John Colvin 1fb7f13308 refactor: Replace Kronuz/cpp-btree w/ JGRennison/btree
The latter is supposedly a clone of google's btree, and cempiled with
fewer errors out-of-the-box than the former.
2022-10-11 23:19:47 -04:00
John Colvin 711b401f64 build: Benign changes to remove errors in gcc 12 2022-10-11 23:19:47 -04:00
John Colvin af00510aea build: Benign changes to remove errors in clang 15 2022-10-11 23:19:47 -04:00
John Colvin 6d56f67697 feat: Add volsurface graph settings dialog
A lot of the vm code was already there, but I cleaned it up a bit. The view was
ported over from edge and also cleaned up/tweaked a bit.
2022-10-10 14:46:34 -04:00
John Colvin c0289719e7 fix (pre-emptive): Add null check in 'DisposeAll' fn
Bugs (fixed):
  * The volsurface graph settings dialog crashes when you click OK/Apply

    Note: This fix is 'pre-emptive' because I saw the bug while working on the
    vs graph settings dialog. That feat will be added shortly in a subsequent
    commit (I wanted to commit the fix first so the bug wouldn't be in the
    official 'feat' revision/commit).

    Cause: A null ref ex is thrown in DisposeAll, because the List of IDisposables
    to dispose contains null items.

    Another way to fix the bug would have been to make sure null items aren't
    added to these Lists in the first place. However, that places the burden (to
    check for null) on the callers' shoulders, and leaves open the potential for
    this bug in every place where 'DisposeAll' is called.
2022-10-10 14:35:29 -04:00
John Colvin a32e969b39 fix (ui): Fix ColorPickerControl/Popup SelectedColor binding
There were a few issues here:
  * The ColorPickerPopup was binding it's own SelectedColor prop to the internal
    ColorPickerControl's SelectedColor prop. The SelectedColor prop is typically also
    bound to some (external) viewmodel's 'color' prop. This is problematic as
    Dependency Properties can only be associated with one 'Write' binding.

  * The code designed to keep various sub-color properties in sync with the
    result color was confusing, and didn't seem to work. For example, the ARGB
    sliders' values didn't match those of the 'result' color.
2022-10-10 14:22:34 -04:00
John Colvin f5899e7781 fix (vs graph): Bind series vm color to correct OxyPlot prop
Bugs (fixed):
  * The VolSurface graph colors don't reflect the settings. They appear to be
    randomly generated.

   Cause: The series vm's color prop was bound to 'TextColor' in the model; it
   should have been bound to 'Color'
2022-10-10 11:17:17 -04:00
John Colvin ed07c956a7 ui: Remove quotes around 'Enter' in col filter prompt
Looks cleaner this way, and isn't clipped given the current width
2022-10-10 11:15:14 -04:00
Taha Afzal 2022ee5a07 Completing Deribit execution test 2022-10-10 11:01:59 -04:00
Taha Afzal a0bc1e8691 Spreader can handle options now 2022-10-09 23:56:38 -04:00
Taha Afzal c1951ac49a Added ability to view md/theo in USD, in the sheets 2022-10-08 21:45:57 -04:00
John Colvin e159e0e77b ui (man fills): Add 'Time Entered' column 2022-10-07 15:04:36 -04:00
John Colvin 6bbd4134ec ui (man fills): Use foreground to indicate buy/sell 2022-10-07 15:04:35 -04:00
John Colvin 8a72b2150a ui (rec rep): Use font weight to indicate price/qty discreps 2022-10-07 15:04:35 -04:00
John Colvin e4d5d1eeb2 ui (rec rep): Use foreground to indicate long/short pos 2022-10-07 15:04:35 -04:00
John Colvin 6bf2726b63 ui (rec rep): Filter out system spread positions
The exchange splits spread positions into the individual legs
2022-10-07 14:50:10 -04:00
Taha Afzal a63af0cb46 Manual tests for Deribit order execution 2022-10-06 22:37:39 -04:00
John Colvin b2a7e1d2ed feat: Add 'Send RFQ' button to ladder 2022-10-05 13:35:00 -04:00
John Colvin 32a38b3b5a refactor: Remove unused code 2022-10-05 13:35:00 -04:00
John Colvin 8533bcf0a7 style: Format LadderView.xaml
It's a big file. Irregular formatting/spacing makes it difficult to navigate.

* Use max line width of 100
* Add empty line after multiline tags
* Trim trailing white space
* Rename terse xml namespaces:
   - 'converters' -> 'cv'
   - 'spark' -> 'sp'
   - 'mbts' -> 'u'

fix fmt ladder
2022-10-05 13:34:39 -04:00
154 changed files with 1843 additions and 706 deletions

No files matched your search

+59 -10
View File
@@ -20,9 +20,6 @@ set(SPARK_LIB "${EXTERNALS_ROOT}/lib/${CMAKE_BUILD_TYPE}")
set(BUILD_SDK OFF CACHE BOOL "Build the sdk")
set(BUILD_WEB ON CACHE BOOL "Build the web server")
include_directories(BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
link_directories(${SPARK_LIB})
include(${CMAKE_SOURCE_DIR}/cmake/CPM.cmake)
# CPM packages
@@ -34,22 +31,73 @@ CPMAddPackage("gh:google/double-conversion@3.2.1")
CPMAddPackage("gh:cameron314/concurrentqueue@1.0.3")
CPMAddPackage("gh:cameron314/readerwriterqueue@1.0.6")
CPMAddPackage("gh:HowardHinnant/date@3.0.1")
CPMAddPackage("gh:zeux/pugixml@1.12.1")
CPMAddPackage("gh:CLIUtils/CLI11@2.3.0")
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
find_package(quickfix REQUIRED)
# Catch2
CPMAddPackage(
NAME Catch2
GITHUB_REPOSITORY catchorg/Catch2
VERSION 2.13.9
DOWNLOAD_ONLY True)
add_library(Catch2 INTERFACE)
target_include_directories(Catch2 SYSTEM INTERFACE ${Catch2_SOURCE_DIR}/single_include)
# curl
CPMAddPackage(
GITHUB_REPOSITORY curl/curl
GIT_TAG curl-7_85_0
OPTIONS
"BUILD_SHARED_LIBS OFF"
"POSITION_INDEPENDENT_CODE ON"
"CURL_DISABLE_GOPHER ON"
"CURL_DISABLE_IMAP ON"
"CURL_DISABLE_IMAPS ON"
"CURL_DISABLE_LDAP ON"
"CURL_DISABLE_LDAPS ON"
"CURL_DISABLE_POP3 ON"
"CURL_DISABLE_RTSP ON"
"CURL_DISABLE_SMB ON"
"CURL_DISABLE_SMTP ON"
"CURL_DISABLE_TELNET ON"
"CURL_DISABLE_TFTP ON"
"USE_LIBIDN2 OFF"
"USE_RTMP OFF"
"USE_ZLIB OFF")
set_target_properties(
libcurl
PROPERTIES
COMPILE_OPTIONS "-fPIC")
# websocketpp
CPMAddPackage("gh:zaphoyd/websocketpp#0.8.2")
add_library(websocketpp INTERFACE)
set_target_properties(websocketpp PROPERTIES CMAKE_CXX_FLAGS "-Wno-null-pointer-subtraction")
target_include_directories(websocketpp SYSTEM INTERFACE ${websocketpp_SOURCE_DIR})
set_target_properties(
websocketpp
PROPERTIES
CMAKE_CXX_FLAGS "-Wno-null-pointer-subtraction"
LINKER_LANGUAGE CXX)
# abseil
CPMAddPackage(
NAME absl
GITHUB_REPOSITORY abseil/abseil-cpp
GIT_TAG 20220623.1
DOWNLOAD_ONLY True
)
DOWNLOAD_ONLY True)
add_library(absl INTERFACE)
# ccapi
CPMAddPackage("gh:crypto-chassis/ccapi@5.31.3")
add_library(ccapi INTERFACE)
# Use SYSTEM includes to suppress compilation warnings
target_include_directories(ccapi SYSTEM INTERFACE ${ccapi_SOURCE_DIR}/include)
string(TOUPPER ${CMAKE_BUILD_TYPE} _build_type_u)
# benchmark
CPMAddPackage(
NAME benchmark
@@ -59,8 +107,10 @@ CPMAddPackage(
"BENCHMARK_ENABLE_TESTING OFF"
"CMAKE_CXX_FLAGS_${_build_type_u} -Wno-unused-but-set-variable -Wno-deprecated-declarations"
"BENCHMARK_DOWNLOAD_DEPENDENCIES ON"
"CMAKE_CXX_STANDARD 17"
)
"CMAKE_CXX_STANDARD 17")
include_directories(BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
link_directories(${SPARK_LIB})
if(WIN32)
# subdirs
@@ -74,9 +124,8 @@ else()
# subdirs
add_subdirectory(src/server/sparkd)
add_dependencies(sparkd benchmark)
add_dependencies(sparkd quickfix_proj)
add_subdirectory(src/lib)
add_dependencies(libspark benchmark)
if(BUILD_WEB)
add_subdirectory(src/web)
endif()
+3 -3
View File
@@ -44,7 +44,7 @@
"CMAKE_INSTALL_RPATH": ".",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}/sparkd",
"CMAKE_EXE_LINKER_FLAGS": "-Wno-undef",
"CPM_SOURCE_CACHE": "${sourceDir}/.cpm_cache/",
"CPM_SOURCE_CACHE": "$env{HOME}/.cache/cpm",
"EXTERNALS_ROOT": "${sourceDir}/externals/linux",
"CMAKE_CXX_STANDARD": "17",
"WEB_TSCONFIG_NAME": "${presetName}",
@@ -72,7 +72,7 @@
},
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CXX_FLAGS_DEBUG": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-deprecated-builtins -Wno-array-parameter -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color"
"CMAKE_CXX_FLAGS_DEBUG": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color"
}
},
@@ -115,7 +115,7 @@
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -Wno-stringop-overread -fno-omit-frame-pointer -DNDEBUG -O3"
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -Wno-stringop-overread -Wno-maybe-uninitialized -fno-omit-frame-pointer -DNDEBUG -O3"
}
},
+17
View File
@@ -0,0 +1,17 @@
include(ExternalProject)
if(NOT TARGET quickfix_proj)
set(_quickfix_prefix ${CMAKE_CURRENT_BINARY_DIR}/quickfix)
set(quickfix_SOURCE_DIR ${_quickfix_prefix}/src/quickfix_proj)
set(quickfix_INCLUDE_DIR ${quickfix_SOURCE_DIR}/include)
set(quickfix_LIBRARY_DIR ${quickfix_SOURCE_DIR}/lib)
ExternalProject_Add(
quickfix_proj
GIT_REPOSITORY https://github.com/quickfix/quickfix.git
GIT_TAG d73d1e86a2099d1dd6eaa3ed8b7d78ed73888877
PREFIX ${_quickfix_prefix}
CONFIGURE_COMMAND cd ${quickfix_SOURCE_DIR} && ./bootstrap && ./configure --enable-shared=no --enable-static=yes
BUILD_COMMAND cd ${quickfix_SOURCE_DIR} && make -j 4
INSTALL_COMMAND "")
endif()
@@ -12,7 +12,7 @@ namespace mbts.spark {
using System.Collections.Generic;
[ProtoContract]
class VolSurfaceGraphSettings : IEquatable<VolSurfaceGraphSettings>, ICloneable {
class VolSurfaceGraphSettings : IProtobuf<VolSurfaceGraphSettings> {
public static VolSurfaceGraphSettings get_default() {
return new VolSurfaceGraphSettings {
put_control_points = new ScatterSeriesSettings {
@@ -110,7 +110,7 @@ namespace mbts.spark {
// }
//}
public object Clone() =>
public VolSurfaceGraphSettings Clone() =>
ProtobufSerializationHelper.clone(this);
public bool Equals(VolSurfaceGraphSettings other) =>
@@ -10,7 +10,9 @@ namespace mbts.spark {
using mbts.ui.shell;
using mbts.ui.utility;
using Spark.Analytics.View;
using Spark.Core.Disposables;
using Spark.Core.Protobuf;
using System;
using System.Collections;
@@ -29,13 +31,13 @@ namespace mbts.spark {
readonly LinearAxisVM _x_axis = new() { position = AxisPosition.BottomLeftToRight };
readonly LinearAxisVM _y_axis = new() { position = AxisPosition.LeftBottomToTop };
readonly Dictionary<SecurityExpiration, ExpGraphBounds> _expiration_graph_bounds;
readonly VolSurfaceGraphSettings _settings;
readonly ObservableCollection<VolSurfaceDisplayGridExpiration> _expirations = new();
readonly Dictionary<VolSurfaceDisplayGridExpiration, SeriesSetVM> _expiration_series_cache = new();
VolSurfaceExpiration _md_exp;
VolSurfaceDisplayGridExpiration _expiration;
VolSurfaceDisplayGridExpiration _earliest_selected_expiration;
VolSurfaceGraphSettings _settings;
object _implied_vol_market_side = ImpliedVolHelper.None;
bool _show_vol_path;
@@ -82,13 +84,17 @@ namespace mbts.spark {
if (_model.get_active_settings() is not VolSurfaceSettings vss) {
return null;
}
// return new VolSurfaceGraphSettingsEditor {
// DataContext = new VolSurfaceGraphSettingsEditorVM(vss.core_settings.vol_surface_name, ProtoBufSerializationHelper.clone_protobuf(_settings), settings => {
// _settings = settings;
// _recreate_series();
// })
// };
return null;
var vm = new VolSurfaceGraphSettingsVM(vss.core_settings.vol_surface_name);
vm.load_from(_settings.Clone());
vm.request_commit += commit;
return new VolSurfaceGraphSettingsWindow {
DataContext = vm
};
void commit(VolSurfaceGraphSettings settings) {
_settings = settings;
_recreate_series();
}
});
graph_vm = new BTSGraphVM {
plot_area_background = Colors.Transparent,
@@ -185,6 +191,20 @@ namespace mbts.spark {
static (double call_wing_start, double put_wing_start) _get_actual_wing_starts(VolCurveDisplayGraph disp_graph) =>
disp_graph.all_points.Select(p => p.Item1).MinMax() ?? (double.NaN, double.NaN);
void _recreate_series() {
/// 'graph_vm.series_set' is bound to '_expirations', so clearing and re-adding expirations
/// in turn regenerates the series. '_expiration_series_cache' must
/// be cleared as well, otherwise cached series vms would just be back to the collection
/// ('graph_vm.series_set').
var visible_exp = _earliest_selected_expiration;
_expiration_series_cache.Clear();
_expirations.SetItems(_model.get_ordered_expirations());
foreach (var svm in graph_vm.series.OfType<SeriesSetVM>()) {
svm.is_visible = svm.args.Equals(visible_exp);
}
_update();
}
void _expirations_changed(IEnumerable<VolSurfaceDisplayGridExpiration> added, IEnumerable<VolSurfaceDisplayGridExpiration> removed) {
_expirations.sync_with(_model.get_ordered_expirations());
_update();
@@ -1,72 +0,0 @@
using mbts.ui;
using mbts.ui.controls.graph;
using System;
using System.Windows.Input;
using System.Windows.Media;
namespace mbts.spark
{
class VolSurfaceGraphSettingsEditorVM
{
public VolSurfaceGraphSettingsEditorVM(string vol_surface_name, VolSurfaceGraphSettings settings, Action<VolSurfaceGraphSettings> commit) {
this.vol_surface_name = vol_surface_name;
_settings = settings;
this.commit = new DelegateCommand(() => commit(_settings));
}
private readonly VolSurfaceGraphSettings _settings;
public string vol_surface_name { get; private set; }
public VolSurfaceScatterSeriesSettingsVM implied_puts { get { return new VolSurfaceScatterSeriesSettingsVM(_settings.implied_puts); } }
public VolSurfaceScatterSeriesSettingsVM implied_atm { get { return new VolSurfaceScatterSeriesSettingsVM(_settings.implied_atm); } }
public VolSurfaceScatterSeriesSettingsVM implied_calls { get { return new VolSurfaceScatterSeriesSettingsVM(_settings.implied_calls); } }
public VolSurfaceScatterSeriesSettingsVM put_control_points { get { return new VolSurfaceScatterSeriesSettingsVM(_settings.put_control_points); } }
public VolSurfaceScatterSeriesSettingsVM atm { get { return new VolSurfaceScatterSeriesSettingsVM(_settings.atm); } }
public VolSurfaceScatterSeriesSettingsVM call_control_points { get { return new VolSurfaceScatterSeriesSettingsVM(_settings.call_control_points); } }
public VolSurfaceLineSeriesSettingsVM put_wing { get { return new VolSurfaceLineSeriesSettingsVM(_settings.put_wing); } }
public VolSurfaceLineSeriesSettingsVM inner_curve { get { return new VolSurfaceLineSeriesSettingsVM(_settings.inner_curve); } }
public VolSurfaceLineSeriesSettingsVM call_wing { get { return new VolSurfaceLineSeriesSettingsVM(_settings.call_wing); } }
public VolSurfaceLineSeriesSettingsVM vol_path { get { return new VolSurfaceLineSeriesSettingsVM(_settings.vol_path); } }
public ICommand commit { get; private set; }
}
class VolSurfaceScatterSeriesSettingsVM
{
public VolSurfaceScatterSeriesSettingsVM(ScatterSeriesSettings settings) {
_settings = settings;
}
private readonly ScatterSeriesSettings _settings;
public MarkerShape shape { get { return _settings.shape; } set { _settings.shape = value; } }
public double size { get { return _settings.size; } set { _settings.size = value; } }
public Color fill {
get => _settings.fill;
set => _settings.fill = value;
}
public Color stroke {
get => _settings.stroke;
set => _settings.stroke = value;
}
public Array shapes { get { return Enum.GetValues(typeof(MarkerShape)); } }
}
class VolSurfaceLineSeriesSettingsVM
{
public VolSurfaceLineSeriesSettingsVM(LineSeriesSettings settings) {
_settings = settings;
}
private readonly LineSeriesSettings _settings;
public Color color { get { return (Color)_settings.color; } set { _settings.color = (BTSColor)value; } }
public double thickness { get { return _settings.stroke_thickness; } set { _settings.stroke_thickness = value; } }
}
}
+15
View File
@@ -0,0 +1,15 @@
namespace Spark {
using System;
using System.Runtime.InteropServices;
static class ConsoleInterop {
[DllImport("kernel32.dll")]
static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr h_wnd, int n_cmd_show);
[DllImport("kernel32.dll", SetLastError = true)]
internal static extern int FreeConsole();
}
}
@@ -99,7 +99,8 @@ namespace Spark.Trading {
.Where(t => t.has_changes())
.Cache();
merged_positions = ReconcileReportDataSource.create(on_exchange_positions, on_positions)
merged_positions = ReconcileReportDataSource.create(
on_exchange_positions, on_positions.Filter(tup => !(tup.Item1?.HasSpread ?? false)))
.Cache();
_dispose = new(on_positions.Subscribe(_security_positions_demuxer));
@@ -0,0 +1,161 @@
<UserControl
x:Class="Spark.Analytics.View.VolSurfaceGraphSettingsView"
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="clr-namespace:mbts.ui"
xmlns:c="clr-namespace:mbts.ui.controls"
Grid.IsSharedSizeScope="True">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/view/Controls/ExpandedContentSelector.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox">
<Setter Property="Margin" Value="8" />
<Setter Property="Padding" Value="5" />
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock Text="{Binding}" FontWeight="Bold" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="GroupBox" x:Key="inner" BasedOn="{StaticResource {x:Type GroupBox}}">
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock Text="{Binding}" FontWeight="Regular" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ScatterSeriesTemplate">
<Grid HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="label" />
<ColumnDefinition Width="*" SharedSizeGroup="value" />
</Grid.ColumnDefinitions>
<TextBlock Text="Shape" VerticalAlignment="Center" Margin="7,4,7,4" />
<ComboBox
Grid.Column="1"
ItemsSource="{Binding shapes}"
Margin="3"
SelectedValue="{Binding shape}" />
<TextBlock Grid.Row="1" VerticalAlignment="Center" Text="Size" Margin="7,4,7,4" />
<c:TickUpDownDouble Grid.Row="1" Grid.Column="1" Margin="3" Value="{Binding size}" />
<TextBlock Grid.Row="2" VerticalAlignment="Center" Text="Color" Margin="7,4,7,4" />
<c:ColorPickerPopup
Grid.Row="2"
Grid.Column="1"
Margin="3"
DataContext="{Binding fill_vm}"
SelectedColor="{Binding color}"
Palettes="{Binding palettes}" />
</Grid>
</ControlTemplate>
<DataTemplate x:Key="LineSeriesTemplate">
<Grid HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="label" />
<ColumnDefinition Width="*" SharedSizeGroup="value" />
</Grid.ColumnDefinitions>
<TextBlock Text="Thickness" VerticalAlignment="Center" Margin="7,4,7,4" />
<c:TickUpDownDouble Grid.Column="1" Margin="3" Value="{Binding stroke_thickness}" />
<TextBlock Grid.Row="1" VerticalAlignment="Top" Text="Color" Margin="7,4,7,4" />
<c:ColorPickerPopup
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Top"
Margin="3"
DataContext="{Binding color_vm}"
SelectedColor="{Binding color}"
Palettes="{Binding palettes}" />
</Grid>
</DataTemplate>
</ResourceDictionary>
</UserControl.Resources>
<c:ExpandedContentSelector>
<c:ExpandedContentSelectorItem Header="Control Points">
<StackPanel Orientation="Horizontal">
<GroupBox
Header="Puts"
DataContext="{Binding put_control_points}"
Style="{StaticResource inner}">
<ContentControl Template="{StaticResource ScatterSeriesTemplate}" />
</GroupBox>
<GroupBox Header="ATM" DataContext="{Binding atm}" Style="{StaticResource inner}">
<ContentControl Template="{StaticResource ScatterSeriesTemplate}" />
</GroupBox>
<GroupBox
Header="Calls"
DataContext="{Binding call_control_points}"
Style="{StaticResource inner}">
<ContentControl Template="{StaticResource ScatterSeriesTemplate}" />
</GroupBox>
</StackPanel>
</c:ExpandedContentSelectorItem>
<c:ExpandedContentSelectorItem Header="Main Curve">
<StackPanel Orientation="Horizontal">
<GroupBox
Header="Put Wing"
DataContext="{Binding put_wing}"
Content="{Binding}"
ContentTemplate="{StaticResource LineSeriesTemplate}"
Style="{StaticResource inner}" />
<GroupBox
Header="Inner Curve"
DataContext="{Binding inner_curve}"
Content="{Binding}"
ContentTemplate="{StaticResource LineSeriesTemplate}"
Style="{StaticResource inner}" />
<GroupBox
Header="Call Wing"
DataContext="{Binding call_wing}"
Content="{Binding}"
ContentTemplate="{StaticResource LineSeriesTemplate}"
Style="{StaticResource inner}" />
</StackPanel>
</c:ExpandedContentSelectorItem>
<c:ExpandedContentSelectorItem Header="Implied Vol">
<StackPanel Orientation="Horizontal">
<GroupBox
Header="Puts" DataContext="{Binding implied_puts}" Style="{StaticResource inner}">
<ContentControl Template="{StaticResource ScatterSeriesTemplate}" />
</GroupBox>
<GroupBox
Header="ATM" DataContext="{Binding implied_atm}" Style="{StaticResource inner}">
<ContentControl Template="{StaticResource ScatterSeriesTemplate}" />
</GroupBox>
<GroupBox
Header="Calls" DataContext="{Binding implied_calls}" Style="{StaticResource inner}">
<ContentControl Template="{StaticResource ScatterSeriesTemplate}" />
</GroupBox>
</StackPanel>
</c:ExpandedContentSelectorItem>
<c:ExpandedContentSelectorItem Header="Vol Path">
<ContentControl
Margin="16,8"
DataContext="{Binding vol_path}"
Content="{Binding}"
ContentTemplate="{StaticResource LineSeriesTemplate}" />
</c:ExpandedContentSelectorItem>
</c:ExpandedContentSelector>
</UserControl>
@@ -0,0 +1,9 @@
#nullable enable
namespace Spark.Analytics.View {
using System.Windows.Controls;
partial class VolSurfaceGraphSettingsView : UserControl {
public VolSurfaceGraphSettingsView() =>
InitializeComponent();
}
}
@@ -0,0 +1,31 @@
<Window
x:Class="Spark.Analytics.View.VolSurfaceGraphSettingsWindow"
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:analytics="clr-namespace:Spark.Analytics.View"
xmlns:u="clr-namespace:mbts.ui"
xmlns:c="clr-namespace:mbts.ui.controls"
Title="{Binding vol_surface_name, StringFormat='{}Graph Settings \&apos;{0}\&apos;'}"
Style="{StaticResource BTSDialog}"
u:WindowStyle.SizeToContent="WidthAndHeight"
u:WindowStyle.AllowResize="True"
Grid.IsSharedSizeScope="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ScrollViewer
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<analytics:VolSurfaceGraphSettingsView />
</ScrollViewer>
<c:DialogSkirtOKApplyCancel
Grid.Row="1" OKCommand="{Binding commit_cmd}" ApplyCommand="{Binding apply_cmd}" />
</Grid>
</Window>
@@ -0,0 +1,9 @@
#nullable enable
namespace Spark.Analytics.View {
using System.Windows;
partial class VolSurfaceGraphSettingsWindow : Window {
public VolSurfaceGraphSettingsWindow() =>
InitializeComponent();
}
}
@@ -0,0 +1,85 @@
#nullable enable
namespace mbts.spark {
using mbts.ui;
using System;
using System.Windows.Input;
class VolSurfaceGraphSettingsVM : IRequestViewClose {
/// <summary>
/// A reference to the settings obj last loaded (<see cref="load_from"/>). It contains props
/// that aren't edited by this class. It is kept because a settings obj generated by this
/// class from scratch would lose some information from the original settings obj.
/// </summary>
VolSurfaceGraphSettings? _settings;
public VolSurfaceGraphSettingsVM(string vol_surface_name) {
this.vol_surface_name = vol_surface_name;
apply_cmd = new Command(apply);
commit_cmd = new Command(commit);
void apply() {
if (request_commit is null) {
return;
}
var res = _settings?.Clone() ?? new();
assign_to(res);
request_commit(res);
}
void commit() {
apply();
RequestClose?.Invoke(this, EventArgs.Empty);
}
}
public event EventHandler? RequestClose;
public event Action<VolSurfaceGraphSettings>? request_commit;
public string vol_surface_name { get; }
public VolSurfaceScatterSeriesSettingsVM implied_puts { get; } = new();
public VolSurfaceScatterSeriesSettingsVM implied_atm { get; } = new();
public VolSurfaceScatterSeriesSettingsVM implied_calls { get; } = new();
public VolSurfaceScatterSeriesSettingsVM put_control_points { get; } = new();
public VolSurfaceScatterSeriesSettingsVM atm { get; } = new();
public VolSurfaceScatterSeriesSettingsVM call_control_points { get; } = new();
public VolSurfaceLineSeriesSettingsVM put_wing { get; } = new();
public VolSurfaceLineSeriesSettingsVM inner_curve { get; } = new();
public VolSurfaceLineSeriesSettingsVM call_wing { get; } = new();
public VolSurfaceLineSeriesSettingsVM vol_path { get; } = new();
public ICommand apply_cmd { get; }
public ICommand commit_cmd { get; }
public void assign_to(VolSurfaceGraphSettings settings) {
implied_puts.assign_to(settings.implied_puts);
implied_atm.assign_to(settings.implied_atm);
implied_calls.assign_to(settings.implied_calls);
put_control_points.assign_to(settings.put_control_points);
atm.assign_to(settings.atm);
call_control_points.assign_to(settings.call_control_points);
put_wing.assign_to(settings.put_wing);
inner_curve.assign_to(settings.inner_curve);
call_wing.assign_to(settings.call_wing);
vol_path.assign_to(settings.vol_path);
}
public void load_from(VolSurfaceGraphSettings settings) {
_settings = settings;
implied_puts.load_from(settings.implied_puts);
implied_atm.load_from(settings.implied_atm);
implied_calls.load_from(settings.implied_calls);
put_control_points.load_from(settings.put_control_points);
atm.load_from(settings.atm);
call_control_points.load_from(settings.call_control_points);
put_wing.load_from(settings.put_wing);
inner_curve.load_from(settings.inner_curve);
call_wing.load_from(settings.call_wing);
vol_path.load_from(settings.vol_path);
}
}
}
@@ -0,0 +1,30 @@
#nullable enable
namespace mbts.spark {
using mbts.ui.controls;
using mbts.ui.shell;
class VolSurfaceLineSeriesSettingsVM : ViewModelBase {
readonly Property<double> _stroke_thickness;
public VolSurfaceLineSeriesSettingsVM() {
_stroke_thickness = backing(nameof(stroke_thickness), 2.0);
}
public double stroke_thickness {
get => _stroke_thickness.Value;
set => _stroke_thickness.set(value);
}
public ColorPickerPopupVM color_vm { get; } = new() { bind_opacity_to_alpha = true };
public void load_from(LineSeriesSettings settings) {
color_vm.color = settings.color;
stroke_thickness = settings.stroke_thickness;
}
public void assign_to(LineSeriesSettings settings) {
settings.color = color_vm.color;
settings.stroke_thickness = stroke_thickness;
}
}
}
@@ -0,0 +1,47 @@
#nullable enable
namespace mbts.spark {
using mbts.ui.controls;
using mbts.ui.shell;
using mbts.ui.utility;
using System.Collections.Generic;
class VolSurfaceScatterSeriesSettingsVM : ViewModelBase {
readonly Property<MarkerShape> _shape;
readonly Property<double> _size;
public VolSurfaceScatterSeriesSettingsVM() {
_shape = backing(nameof(shape), MarkerShape.Circle);
_size = backing(nameof(size), 2.0);
}
public MarkerShape shape {
get => _shape.Value;
set => _shape.set(value);
}
public double size {
get => _size.Value;
set => _size.set(value);
}
public IReadOnlyList<MarkerShape> shapes =>
EnumHelper.get_values<MarkerShape>();
public ColorPickerPopupVM fill_vm { get; } = new() { bind_opacity_to_alpha = true };
public ColorPickerPopupVM stroke_vm { get; } = new() { bind_opacity_to_alpha = true };
public void load_from(ScatterSeriesSettings settings) {
shape = settings.shape;
size = settings.size;
fill_vm.color = settings.fill;
stroke_vm.color = settings.stroke;
}
public void assign_to(ScatterSeriesSettings settings) {
settings.fill = fill_vm.color;
settings.stroke = stroke_vm.color;
settings.shape = shape;
}
}
}
@@ -96,7 +96,6 @@ namespace mbts.spark {
ulong _misc_time = 0;
ulong _last_trade_time = 0;
IReadOnlyDictionary<uint, OrderSecurity> _cache = DictionaryHelper.empty<uint, OrderSecurity>();
IReadOnlyDictionary<uint, SecurityMD> _security_map = DictionaryHelper.empty<uint, SecurityMD>();
ImmutableDictionary<AlgoKey, LadderFavoriteAlgoMetadata> _favorite_algo_metadata_map =
ImmutableDictionary<AlgoKey, LadderFavoriteAlgoMetadata>.Empty;
ContractSpecificationImmutable? _spec;
@@ -234,6 +233,7 @@ namespace mbts.spark {
size_calculator.value = pos.abs();
});
send_order_cmd = new AsyncCommand<(double price, Side? side, MouseButton button)>(send_order_async);
send_rfq_cmd = new Command(_send_rfq);
cancel_cmd = new AsyncCommand<LadderModel.CancelType>(_model.cancel_orders, true);
show_book_cmd = new Command(_show_book);
show_ticket_cmd = new Command(_show_ticket);
@@ -254,7 +254,6 @@ namespace mbts.spark {
settings.OnDispatcher().Subscribe(settings_observer),
get_order_properties_editor_hooks(),
bus.subscribe(SparkTags.LogActivity).OnDispatcher().Subscribe(status_update),
bus.subscribe(SparkTags.SecuritiesTag).OnDispatcher().Subscribe(on_security_map),
model.greeks.OnDispatcher().Subscribe(g => {
_theo.set(g.normalized_theo);
_delta.set(g.delta);
@@ -344,10 +343,6 @@ namespace mbts.spark {
RaisePropertyChanged(nameof(position_display_text));
}));
}
void on_security_map(IReadOnlyDictionary<uint, SecurityMD> security_map) {
_security_map = security_map;
}
}
public static LadderVM create(
@@ -574,6 +569,7 @@ namespace mbts.spark {
public IAsyncCommand cancel_cmd { get; }
public ICommand send_order_cmd { get; }
public ICommand send_rfq_cmd { get; }
public ICommand show_book_cmd { get; }
public ICommand show_ticket_cmd { get; }
public ICommand settings_cmd { get; }
@@ -866,6 +862,13 @@ namespace mbts.spark {
_misc_time = _model.md.misc_timestamp;
}
void _send_rfq() =>
_bus.post(SparkTags.RFQSend, new(new() {
Security = new() {
SecurityId = security.Id
}
}));
void _show_book() {
var ob_settings = bts.shell.orderbook.OrderBookStartupData.Default;
ob_settings.filters = new bts.shell.orderbook.FilterStates {
@@ -886,12 +889,5 @@ namespace mbts.spark {
_update_header();
on_tick?.Invoke();
}
SecurityMD? _find_sec_md(uint sec_key) {
if (_security_map.TryGetValue(sec_key, out var sec_md)) {
return sec_md;
}
return null;
}
}
}
File diff suppressed because it is too large. Load diff
@@ -109,6 +109,10 @@ namespace bts.shell.manual_fills {
}
public TickDisplaySettingsImmutable quantity_display => _quantity_display.Value;
public double price { get => _price; set => _set(ref _price, value); }
public DateTime time_entered =>
data.value.manual_fill.Timestamp.to_local_time();
// is selected
public bool is_selected {
get => _is_selected;
@@ -7,7 +7,14 @@
xmlns:c="clr-namespace:mbts.ui.controls"
xmlns:cv="clr-namespace:mbts.ui.converters"
xmlns:usp="clr-namespace:mbts.ui.spark"
>
xmlns:api="clr-namespace:bts.api;assembly=spark_api">
<UserControl.Resources>
<cv:ValueMap x:Key="SideToForegroundConverter" Default="{x:Static Brushes.Transparent}">
<cv:KeyValue Key="{x:Static api:Side.Buy}" Value="{u:BTSBrush MarketData.bid}" />
<cv:KeyValue Key="{x:Static api:Side.Sell}" Value="{u:BTSBrush MarketData.ask}" />
</cv:ValueMap>
</UserControl.Resources>
<AdornerDecorator>
<Grid>
<DataGrid
@@ -199,7 +206,10 @@
<DataGridTemplateColumn c:DataGridEx.CellKey="{x:Static Side, MemberType={u:Nested usp:ManualFillsView.Columns}}" Header="Side" SortMemberPath="side">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding side}" VerticalAlignment="Center"/>
<TextBlock
VerticalAlignment="Center"
Foreground="{Binding side, Converter={StaticResource SideToForegroundConverter}}"
Text="{Binding side}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
@@ -212,7 +222,9 @@
<DataGridTemplateColumn c:DataGridEx.CellKey="{x:Static Quantity, MemberType={u:Nested usp:ManualFillsView.Columns}}" Header="Qty" SortMemberPath="side">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center">
<TextBlock
VerticalAlignment="Center"
Foreground="{Binding side, Converter={StaticResource SideToForegroundConverter}}">
<TextBlock.Text>
<MultiBinding Converter="{x:Static cv:TickDisplayConverter.Instance}">
<Binding Path="display_quantity" />
@@ -251,6 +263,15 @@
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<!-- Time Entered -->
<DataGridTextColumn
c:DataGridEx.CellKey="{x:Static
TimeEntered, MemberType={u:Nested usp:ManualFillsView.Columns}}"
Header="Time Entered"
Binding="{Binding time_entered}"
SortMemberPath="time_entered"
IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
</Grid>
@@ -30,7 +30,8 @@ namespace mbts.ui.spark {
User,
Side,
Quantity,
Price
Price,
TimeEntered
}
IDisposable _transaction;
@@ -10,6 +10,7 @@
xmlns:usp="clr-namespace:mbts.ui.spark"
xmlns:uspcv="clr-namespace:mbts.ui.spark.converters"
xmlns:trading="clr-namespace:Spark.Trading"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"
u:WindowStyle.UnsafeWindow="{Binding Path='(u:WindowStyle.UnsafeWindow)', RelativeSource={RelativeSource AncestorType=bv:SparkWindowView}}"
FocusManager.IsFocusScope="True"
Background="{StaticResource CommonBackground}">
@@ -25,6 +26,26 @@
<cv:KeyValue Key="{x:Static trading:ReconcileReportMatchType.None}" Value="Match_None" />
</cv:ValueMap>
<cv:ValueConverterPipe x:Key="PositionStateConverter">
<cv:RelativeSortIndexConverter UseTwosComplement="True">
<sys:Double>0</sys:Double>
</cv:RelativeSortIndexConverter>
<cv:ValueMap Default="PositionNone">
<cv:KeyValue Key="{u:Int -1}" Value="PositionShort" />
<cv:KeyValue Key="{u:Int -2}" Value="PositionLong" />
</cv:ValueMap>
</cv:ValueConverterPipe>
<cv:ValueConverterPipe x:Key="ExchangePositionStateConverter">
<cv:RelativeSortIndexConverter UseTwosComplement="True">
<sys:Double>0</sys:Double>
</cv:RelativeSortIndexConverter>
<cv:ValueMap Default="PositionNone">
<cv:KeyValue Key="{u:Int -1}" Value="ExchangePositionShort" />
<cv:KeyValue Key="{u:Int -2}" Value="ExchangePositionLong" />
</cv:ValueMap>
</cv:ValueConverterPipe>
<Style x:Key="TextCell" TargetType="c:TextCell">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="{Binding Path='(c:DIYGrid.Column).horizontal_alignment', RelativeSource={RelativeSource Self}}" />
@@ -96,6 +117,16 @@
Path='(u:StateDefinition.Group).(u:StateGroupsManager.Target).(FrameworkElement.DataContext).match_type',
RelativeSource={RelativeSource Self},
Converter={StaticResource MatchStateConverter}}" />
<u:StateDefinition State="{Binding
Path='(u:StateDefinition.Group).(u:StateGroupsManager.Target).(FrameworkElement.DataContext).quantity',
RelativeSource={RelativeSource Self},
Converter={StaticResource PositionStateConverter}}" />
<u:StateDefinition State="{Binding
Path='(u:StateDefinition.Group).(u:StateGroupsManager.Target).(FrameworkElement.DataContext).exchange_quantity',
RelativeSource={RelativeSource Self},
Converter={StaticResource ExchangePositionStateConverter}}" />
</u:StateDefinitionCollection>
</u:StateGroupsManager>
</u:StateManager.Groups>
@@ -109,13 +140,13 @@
<Storyboard>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="PriceView"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{u:BTSBrush danger}" />
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="ExchangePriceView"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{u:BTSColor danger}" />
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
@@ -123,10 +154,23 @@
<!-- Price matches (but not Quantity) -->
<VisualState Name="Match_Price">
<Storyboard>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="QuantityView"
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="ExchangeQuantityView"
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ColorAnimation
Storyboard.TargetName="RowView"
Storyboard.TargetProperty="Background.Color"
To="{u:Color UI.danger, Opacity=0.33}"
BeginTime="0"
Duration="0" />
</Storyboard>
</VisualState>
@@ -134,10 +178,87 @@
<!-- Nothing matches -->
<VisualState Name="Match_None">
<Storyboard>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="PriceView"
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="ExchangePriceView"
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="QuantityView"
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="ExchangeQuantityView"
Storyboard.TargetProperty="FontWeight">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static FontWeights.Bold}" />
</ObjectAnimationUsingKeyFrames>
<ColorAnimation
Storyboard.TargetName="RowView"
Storyboard.TargetProperty="Background.Color"
To="{u:Color UI.danger, Opacity=0.33}"
BeginTime="0"
Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup Name="PositionStates">
<VisualState Name="PositionNone" />
<VisualState Name="PositionLong">
<Storyboard>
<ColorAnimation
Storyboard.TargetName="QuantityView"
Storyboard.TargetProperty="Foreground.Color"
To="{u:BTSColor MarketData.bid, Type={x:Type Color}}"
BeginTime="0"
Duration="0" />
</Storyboard>
</VisualState>
<VisualState Name="PositionShort">
<Storyboard>
<ColorAnimation
Storyboard.TargetName="QuantityView"
Storyboard.TargetProperty="Foreground.Color"
To="{u:BTSColor MarketData.ask, Type={x:Type Color}}"
BeginTime="0"
Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup Name="ExchangePositionStates">
<VisualState Name="ExchangePositionNone" />
<VisualState Name="ExchangePositionLong">
<Storyboard>
<ColorAnimation
Storyboard.TargetName="ExchangeQuantityView"
Storyboard.TargetProperty="Foreground.Color"
To="{u:BTSColor MarketData.bid, Type={x:Type Color}}"
BeginTime="0"
Duration="0" />
</Storyboard>
</VisualState>
<VisualState Name="ExchangePositionShort">
<Storyboard>
<ColorAnimation
Storyboard.TargetName="ExchangeQuantityView"
Storyboard.TargetProperty="Foreground.Color"
To="{u:BTSColor MarketData.ask, Type={x:Type Color}}"
BeginTime="0"
Duration="0" />
</Storyboard>
</VisualState>
@@ -155,6 +276,7 @@
Style="{StaticResource TextCell}" />
<c:TextCell
x:Name="QuantityView"
c:DIYGrid.ColumnKey="{x:Static trading:ReconcileReportColumnType.Quantity}"
Style="{StaticResource TextCell}">
<c:TextCell.Text>
@@ -166,6 +288,7 @@
</c:TextCell>
<c:TextCell
x:Name="ExchangeQuantityView"
c:DIYGrid.ColumnKey="{x:Static trading:ReconcileReportColumnType.ExchangeQuantity}"
Style="{StaticResource TextCell}">
<c:TextCell.Text>
@@ -165,5 +165,28 @@ namespace BCG
return rv;
}
#endregion
#region accessors
public BBOPacket get_bbo(uint sec_key) {
foreach (var kv in _bbo_map) {
var map = kv.Value;
BBOPacket rv;
if (map.TryGetValue(sec_key, out rv)) {
return rv;
}
}
return null;
}
public mbts.spark.TheoPoint get_theo(bts.api.Venue exchange, string symbol,
DateTime exp, double strike) {
var sym = new NMSheetSymbol(exchange, symbol);
NMSheetSingleOptionData sym_data;
if (_sym_data_map.TryGetValue(sym, out sym_data)) {
return sym_data.get_theo(exp, strike);
}
return null;
}
#endregion
}
}
@@ -279,5 +279,14 @@ namespace BCG {
else
return mbts.analytics.VolSurfaceCoreFunctions.compute_theo_at_nearbydriver(tp.driver, tp.put, tp.pdelta, tp.pgamma, effective_driver);
}
#region accessors
public TheoPoint get_theo(DateTime exp, double strike) {
var rv = _theo_data_map.get_data(exp, strike);
if (rv == null)
return null;
return rv.first;
}
#endregion
}
}
@@ -100,6 +100,7 @@
this._toolstripmenuitem_sheet_settings_window = new System.Windows.Forms.ToolStripMenuItem();
this._statusbar_toolstripstatus_security = new System.Windows.Forms.ToolStripStatusLabel();
this._statusbar_vs_dropdown = new System.Windows.Forms.ToolStripComboBox();
this._statusbar_toolstripstatus_md_theo = new System.Windows.Forms.ToolStripStatusLabel();
this._statusbar_toolstripstatus_column = new System.Windows.Forms.ToolStripStatusLabel();
this._statustrip_main = new System.Windows.Forms.StatusStrip();
this._statusbar_toolstripstatus_task = new System.Windows.Forms.ToolStripStatusLabel();
@@ -726,6 +727,17 @@
this._statusbar_vs_dropdown.Enabled = false;
this._statusbar_vs_dropdown.Text = "Vol Time";
this._statusbar_vs_dropdown.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// _statusbar_toolstripstatus_md_theo
//
this._statusbar_toolstripstatus_md_theo.Font = new System.Drawing.Font("Tahoma", 9F);
this._statusbar_toolstripstatus_md_theo.Name = "_statusbar_toolstripstatus_md_theo";
this._statusbar_toolstripstatus_md_theo.Size = new System.Drawing.Size(49, 17);
this._statusbar_toolstripstatus_md_theo.Enabled = true;
this._statusbar_toolstripstatus_md_theo.Text = "Test";
this._statusbar_toolstripstatus_md_theo.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this._statusbar_toolstripstatus_md_theo.BackColor = System.Drawing.Color.FromArgb(64, 64, 64);
this._statusbar_toolstripstatus_md_theo.ForeColor = System.Drawing.Color.Yellow;
//
// _statusbar_toolstripstatus_column
//
@@ -741,7 +753,8 @@
this._statustrip_main.GripMargin = new System.Windows.Forms.Padding(0);
this._statustrip_main.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
this._statustrip_main.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this._statusbar_vs_dropdown,
this._statusbar_toolstripstatus_md_theo,
// this._statusbar_vs_dropdown,
this._statusbar_toolstripstatus_security,
this._statusbar_toolstripstatus_task,
this._statusbar_toolstripstatus_quoterdata,
@@ -843,6 +856,7 @@
private System.Windows.Forms.ToolStripStatusLabel _statusbar_toolstripstatus_security;
private System.Windows.Forms.ToolStripComboBox _statusbar_vs_dropdown;
private System.Windows.Forms.ToolStripStatusLabel _statusbar_toolstripstatus_md_theo;
private System.Windows.Forms.ToolStripStatusLabel _statusbar_toolstripstatus_column;
private System.Windows.Forms.StatusStrip _statustrip_main;
@@ -2,6 +2,9 @@
using bts.api;
using mbts.spark;
using mbts.ui.converters;
namespace BCG {
partial class NMSheetControl {
private NMSheetTheoGrid.GridCell _last_mousemove_cell = null;
@@ -19,6 +22,7 @@ namespace BCG {
if (force_update || (_statusbar_dirty && DateTime.Now - _last_statusbar_update_time >= _statusbar_refresh_period)) {
uint sec_key = _refresh_status_security_data();
_refresh_status_column_data();
_refresh_md_theo_data(sec_key);
if (!_api_tasking_enabled) {
_refresh_task_data(sec_key);
}
@@ -28,11 +32,48 @@ namespace BCG {
}
}
private void _refresh_md_theo_data(uint sec_key) {
string null_txt = "---";
Func<BBOPacket, TheoPoint, bool, String> md_txt = (md, tp, is_bid) => {
if (md == null) {
return null_txt;
}
var fwd = tp == null ? Double.NaN : tp.fwd;
double pr = is_bid ? md.md.bid_price : md.md.ask_price;
double qty = is_bid ? md.md.bid_size : md.md.ask_size;
double adjusted_pr = pr * fwd;
if (Double.IsNaN(adjusted_pr)) {
return null_txt;
}
string price_txt = Math.Round(adjusted_pr, 2).ToString();
return $"{price_txt} / {qty}";
};
Func<TheoPoint, bool, string> theo_txt = (tp, is_call) => {
if (tp == null)
return null_txt;
double theo = is_call ? tp.call : tp.put;
return Math.Round(theo, 2).ToString();
};
BBOPacket md = _sheet_data.get_bbo(sec_key);
TheoPoint tp = _sheet_data.get_theo(
_last_mousemove_cell.expiration.nmsheet_symbol.option_exchange,
_last_mousemove_cell.expiration.nmsheet_symbol.option_name,
_last_mousemove_cell.expiration.option_expiration,
_last_mousemove_cell.strike);
_statusbar_toolstripstatus_md_theo.Text =
$"{md_txt(md, tp, true)} | " +
$"{theo_txt(tp, _last_mousemove_cell.call_selected)} | " +
$"{md_txt(md, tp, false)}";
}
private uint _refresh_status_security_data() {
uint seckey = _get_seckey();
string key_text = seckey == 0 ? "(Unlisted)" : String.Format("(Key:{0})", seckey);
_set_text_visibility(_statusbar_toolstripstatus_security, true,
String.Format("{0} {1} {2} {3}", _formatter.format_expiration(_last_mousemove_cell.expiration), _last_mousemove_cell.strike, _last_mousemove_cell.call_selected ? "C" : "P", key_text));
String.Format("{0} {1} {2} {3}",
_formatter.format_expiration(_last_mousemove_cell.expiration),
Math.Round(_last_mousemove_cell.strike, 2),
_last_mousemove_cell.call_selected ? "C" : "P", key_text));
return seckey;
}
@@ -5,6 +5,7 @@ using mbts.ui.utility;
using Spark.Core.Disposables;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -20,10 +21,13 @@ namespace mbts.ui.controls.color_picker {
const int _n_hue_grad_stops = 7;
static readonly double _hue_grad_increment, _hue_grad_stop_unit;
readonly GradientStopCollection _hue_gradient_collection;
readonly Property<Color> _color, _max_saturation;
readonly Property<Color> _color;
readonly DelegateProperty<Color> _max_saturation;
readonly DelegateProperty<string> _saturation_tool_tip, _hue_tool_tip;
readonly DelegateProperty<byte> _alpha, _red, _green, _blue;
readonly Property<double> _hue, _saturation, _light;
readonly DelegateProperty<double> _hue;
readonly DelegateProperty<double> _saturation;
readonly DelegateProperty<double> _light;
readonly SetMap<Color, NamedColorVM> _named_color_map = new SetMap<Color, NamedColorVM>();
readonly ObservableAggregateCollection<NamedColorVM> _all_colors = new ObservableAggregateCollection<NamedColorVM>();
NamedColorVM _selected_named_color;
@@ -142,10 +146,10 @@ namespace mbts.ui.controls.color_picker {
public Color result {
get => _color.Value;
set {
using var _ = _begin_change_color();
_color.Value = value;
if (_named_color_map.try_lookup(value, out ISet<NamedColorVM> ncs)) {
_selected_named_color = ncs.First();
RaisePropertyChanged(nameof(selected_named_color));
}
}
}
@@ -167,6 +171,21 @@ namespace mbts.ui.controls.color_picker {
}
}
IDisposable _begin_change_color() {
return Disposable.Create(refresh);
void refresh() {
_alpha.refresh();
_red.refresh();
_green.refresh();
_blue.refresh();
_hue.refresh();
_saturation.refresh();
_light.refresh();
_max_saturation.refresh();
}
}
void _set_hue_gradient_brush() {
for (int i = 0; i < _n_hue_grad_stops; i++)
_hue_gradient_collection[i].Color = ColorUtils.from_ahsb(alpha, i * _hue_grad_increment, saturation, light);
@@ -69,9 +69,29 @@ namespace mbts.ui.controls.color_picker {
e.CanExecute = true;
}
#region SelectedColorChanged
public static readonly RoutedEvent SelectedColorChangedEvent =
EventManager.RegisterRoutedEvent(
nameof(SelectedColorChanged),
RoutingStrategy.Direct,
typeof(RoutedPropertyChangedEventHandler<Color>),
typeof(ColorPickerControl));
public event RoutedPropertyChangedEventHandler<Color> SelectedColorChanged {
add => AddHandler(SelectedColorChangedEvent, value);
remove => RemoveHandler(SelectedColorChangedEvent, value);
}
#endregion
#region SelectedColor
public static readonly DependencyProperty SelectedColorProperty =
WPFHelper.create_dp<Color, ColorPickerControl>(nameof(SelectedColor), (cp, val) => cp._color_vm.result = val);
WPFHelper.create_dp<Color, ColorPickerControl>(
nameof(SelectedColor),
(o, oldval, newval) => {
o._color_vm.result = newval;
o.RaiseEvent(new RoutedPropertyChangedEventArgs<Color>(
oldval, newval, SelectedColorChangedEvent));
});
public Color SelectedColor { get => (Color)GetValue(SelectedColorProperty); set => SetValue(SelectedColorProperty, value); }
@@ -57,7 +57,6 @@
<cp:ColorPickerControl
x:Name="_color_picker"
Padding="0,0,6,0"
Palettes="{Binding Palettes, RelativeSource={RelativeSource AncestorType=c:ColorPickerPopup}}"
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource AncestorType=c:ColorPickerPopup}, Mode=TwoWay}"
/>
Palettes="{Binding
Palettes, RelativeSource={RelativeSource AncestorType=c:ColorPickerPopup}, Mode=OneWay}" />
</c:PopupControl>
@@ -1,103 +1,120 @@
using bts.proto;
using bts.utils;
using mbts.spark;
using mbts.ui.controls.color_picker;
using mbts.ui.shell;
using Spark.Core.Disposables;
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Media;
namespace mbts.ui.controls {
/// <summary>
/// Interaction logic for ColorPickerPopup.xaml
/// </summary>
partial class ColorPickerPopup : PopupControl {
public ColorPickerPopup() =>
InitializeComponent();
public static readonly DependencyProperty SelectedColorProperty =
WPFHelper.create_dp<Color, ColorPickerPopup>(
nameof(SelectedColor),
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
Colors.Black);
public Color SelectedColor {
get => (Color)GetValue(SelectedColorProperty);
set => SetValue(SelectedColorProperty, value);
}
public static readonly DependencyProperty PalettesProperty =
WPFHelper.create_dp<ObservableCollection<ColorPaletteVM>, ColorPickerPopup>(nameof(Palettes));
public ObservableCollection<ColorPaletteVM> Palettes {
get => GetValue(PalettesProperty) as ObservableCollection<ColorPaletteVM>;
set => SetValue(PalettesProperty, value);
}
}
class ColorPickerPopupVM : ViewModelBase, IValueFactory<SolidColorBrush> {
readonly Property<Color> _color;
readonly Property<double> _opacity;
ObservableCollection<ColorPaletteVM> _palettes;
bool _bind_opacity_to_alpha;
IDisposable _opacity_alpha_binding;
public ColorPickerPopupVM() {
_color = backing(nameof(color), Colors.Black);
_opacity = backing(nameof(opacity), 1.0);
}
public Color color { get => _color.Value; set => _color.set(value); }
public double opacity { get => _opacity.Value; set => _opacity.set(value); }
public ObservableCollection<ColorPaletteVM> palettes => _palettes ?? (_palettes = new ObservableCollection<ColorPaletteVM>(ColorPalette.all_presets().Select(p => new ColorPaletteVM(p))));
public bool bind_opacity_to_alpha {
get => _bind_opacity_to_alpha;
set {
if (_bind_opacity_to_alpha != value) {
Disposable.dispose(ref _opacity_alpha_binding);
_bind_opacity_to_alpha = value;
if (value) {
_opacity.Changed += opacity_changed;
_color.Changed += color_changed;
color_changed(default, color);
void opacity_changed(double oldval, double newval) {
_color.Changed -= color_changed;
_color.set(color.with((byte)(newval.within_range(0, 1) * 255.0)));
_color.Changed += color_changed;
}
void color_changed(Color oldval, Color newval) {
_opacity.Changed -= opacity_changed;
_opacity.set(newval.A / 255.0);
_opacity.Changed += opacity_changed;
}
}
}
}
}
public SolidColorBrush create() => new SolidColorBrush(color) { Opacity = opacity }.frozen();
public void load_from(SolidColorBrush brush) {
color = brush.Color;
opacity = brush.Opacity;
}
public ColorOpacityProto to_proto() => new ColorOpacityProto(color.rgb_color(), opacity);
}
class NamedColorPickerPopupVM : ColorPickerPopupVM {
object _name;
public object name {
get => _name;
set => Set(ref _name, value);
}
public override string ToString() =>
_name == null ? color.ToHexString() : $"{_name}:{color.ToHexString()}";
}
}
using bts;
using bts.proto;
using bts.utils;
using mbts.spark;
using mbts.ui.controls.color_picker;
using mbts.ui.shell;
using mbts.ui.utility;
using Spark.Core;
using Spark.Core.Disposables;
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Media;
namespace mbts.ui.controls {
/// <summary>
/// Interaction logic for ColorPickerPopup.xaml
/// </summary>
partial class ColorPickerPopup : PopupControl {
readonly PropertyUpdateGate _selected_color_gate = new();
public ColorPickerPopup() {
InitializeComponent();
_color_picker.set_current_if_changed(
ColorPickerControl.SelectedColorProperty, SelectedColor);
_color_picker.SelectedColorChanged += (s, e) =>
// propagate change to self
_selected_color_gate.try_update(() =>
this.set_current_if_changed(SelectedColorProperty, e.NewValue));
}
public static readonly DependencyProperty SelectedColorProperty =
WPFHelper.create_dp<Color, ColorPickerPopup>(
nameof(SelectedColor),
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
(o, v) =>
// propagate change to internal color picker
o._selected_color_gate.try_update(() =>
o._color_picker?.set_current_if_changed(
ColorPickerControl.SelectedColorProperty, v)),
Colors.Black);
public Color SelectedColor {
get => (Color)GetValue(SelectedColorProperty);
set => SetValue(SelectedColorProperty, value);
}
public static readonly DependencyProperty PalettesProperty =
WPFHelper.create_dp<ObservableCollection<ColorPaletteVM>, ColorPickerPopup>(nameof(Palettes));
public ObservableCollection<ColorPaletteVM> Palettes {
get => GetValue(PalettesProperty) as ObservableCollection<ColorPaletteVM>;
set => SetValue(PalettesProperty, value);
}
}
class ColorPickerPopupVM : ViewModelBase, IValueFactory<SolidColorBrush> {
readonly Property<Color> _color;
readonly Property<double> _opacity;
ObservableCollection<ColorPaletteVM> _palettes;
bool _bind_opacity_to_alpha;
IDisposable _opacity_alpha_binding;
public ColorPickerPopupVM() {
_color = backing(nameof(color), Colors.Black);
_opacity = backing(nameof(opacity), 1.0);
}
public Color color { get => _color.Value; set => _color.set(value); }
public double opacity { get => _opacity.Value; set => _opacity.set(value); }
public ObservableCollection<ColorPaletteVM> palettes => _palettes ?? (_palettes = new ObservableCollection<ColorPaletteVM>(ColorPalette.all_presets().Select(p => new ColorPaletteVM(p))));
public bool bind_opacity_to_alpha {
get => _bind_opacity_to_alpha;
set {
if (_bind_opacity_to_alpha != value) {
Disposable.dispose(ref _opacity_alpha_binding);
_bind_opacity_to_alpha = value;
if (value) {
_opacity.Changed += opacity_changed;
_color.Changed += color_changed;
color_changed(default, color);
void opacity_changed(double oldval, double newval) {
_color.Changed -= color_changed;
_color.set(color.with((byte)(newval.within_range(0, 1) * 255.0)));
_color.Changed += color_changed;
}
void color_changed(Color oldval, Color newval) {
_opacity.Changed -= opacity_changed;
_opacity.set(newval.A / 255.0);
_opacity.Changed += opacity_changed;
}
}
}
}
}
public SolidColorBrush create() => new SolidColorBrush(color) { Opacity = opacity }.frozen();
public void load_from(SolidColorBrush brush) {
color = brush.Color;
opacity = brush.Opacity;
}
public ColorOpacityProto to_proto() => new ColorOpacityProto(color.rgb_color(), opacity);
}
class NamedColorPickerPopupVM : ColorPickerPopupVM {
object _name;
public object name {
get => _name;
set => Set(ref _name, value);
}
public override string ToString() =>
_name == null ? color.ToHexString() : $"{_name}:{color.ToHexString()}";
}
}
@@ -257,7 +257,7 @@
Margin="5,3"
HorizontalAlignment="Stretch"
Text="{Binding text, UpdateSourceTrigger=PropertyChanged}"
u:TextBoxBehavior.TextPrompt="Search (press 'Enter' to keep)"
u:TextBoxBehavior.TextPrompt="Search (press Enter to keep)"
u:Behavior.FocusOnLoaded="True"
u:TextBoxBehavior.CommitOnEnter="True">
<u:Behavior.BindingUpdateGroups>
@@ -2,6 +2,8 @@ namespace mbts.spark {
using mbts.ui.extensions;
using mbts.ui.utility;
using System.Windows.Media;
/// ** BTSGraphLineSeries in edge **
/// <summary>
/// Represents a line series in a graph
@@ -19,6 +21,14 @@ namespace mbts.spark {
}
}
public Color color {
get => model.Color.as_media_color();
set {
using var _ = detect_property_change();
model.Color = value.as_oxy_color();
}
}
public double stroke_thickness {
get => model.StrokeThickness;
set {
@@ -63,7 +63,7 @@ namespace mbts.spark {
}
}
public Color color {
public Color text_color {
get => model.TextColor.as_media_color();
set {
using var _ = detect_property_change();
@@ -0,0 +1,40 @@
#nullable enable
namespace mbts.ui.converters {
using Spark.Core.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;
[ContentProperty(nameof(Index))]
[ValueConversion(typeof(object), typeof(int))]
class RelativeSortIndexConverter : IValueConverter {
readonly List<object?> _index = new();
public IList Index => _index;
public IComparer? Comparer { get; set; }
/// <summary>
/// If true, a value that isn't contained in the list (by comparative equality) yields the
/// bitwise complement of its relative position (this is the defacto behavior for BinarySearch
/// algorithms, as in <see cref="List{T}.BinarySearch(T)"/>).
/// </summary>
public bool UseTwosComplement { get; set; }
public object? Convert(
object? value, Type target_type, object? parameter, CultureInfo culture) {
int idx = _index.BinarySearch(value, Comparer?.cast<object?>());
if (idx < 0 && !UseTwosComplement) {
idx = ~idx;
}
return idx;
}
public object ConvertBack(
object value, Type target_type, object parameter, CultureInfo culture) =>
throw new NotSupportedException();
}
}
@@ -11,6 +11,9 @@ namespace Spark.Core.Collections {
public static IComparer to_non_generic<T>(this IComparer<T> comparer) =>
new NonGenericComparerWrapper<T>(comparer);
public static IComparer<T> cast<T>(this IComparer comparer) =>
new CastComparerWrapper<T>(comparer);
class NonGenericComparerWrapper<T> : IComparer {
readonly IComparer<T> _comparer;
@@ -19,5 +22,18 @@ namespace Spark.Core.Collections {
public int Compare(object? x, object? y) =>
_comparer.Compare(ConvertUtils.try_convert<T>(x), ConvertUtils.try_convert<T>(y));
}
class CastComparerWrapper<T> : IComparer<T>, IComparer {
readonly IComparer _comparer;
public CastComparerWrapper(IComparer comparer) =>
_comparer = comparer;
public int Compare(T? x, T? y) =>
_comparer.Compare(x, y);
int IComparer.Compare(object? x, object? y) =>
_comparer.Compare(x, y);
}
}
}
@@ -63,7 +63,7 @@ namespace Spark.Core.Disposables {
return;
}
foreach (var d in source) {
d.Dispose();
d?.Dispose();
}
if (clear) {
source.Clear();
+4 -2
View File
@@ -137,6 +137,7 @@ else()
-pthread
-static-libgcc
-static-libstdc++
Catch2
Common++
Packet++
Pcap++
@@ -148,17 +149,18 @@ else()
boost_regex
boost_system
boost_thread
ccapi
concurrentqueue
crypto
cryptopp
curl
date
double-conversion
fmt
libcurl
lttng-ust
nlohmann_json
protobuf
pugixml
pugixml-static
range-v3
readerwriterqueue
rxcpp
@@ -11,7 +11,7 @@
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/stream.hpp>
#include <catch/catch.hpp>
#include <catch2/catch.hpp>
#include <cstdlib>
#include <functional>
#include <iostream>
@@ -198,4 +198,4 @@ TEST_CASE("WebsocketSyncClientTest", "[ws_ssl]") {
}
}
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
#include "lib/expression/ParserExceptions.h"
#include "HTTPServer.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include <iostream>
#include <memory>
+1 -1
View File
@@ -19,7 +19,7 @@
#define URDL_HEADER_ONLY 1
#define URDL_DISALE_SSL 1
#include <catch/catch.hpp>
#include <catch2/catch.hpp>
#include <urdl/test/http_server.hpp>
#include <urdl/url.hpp>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include <iostream>
#include <regex>
+1 -1
View File
@@ -1,6 +1,6 @@
#include "../Security.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/domain_model/Security.h"
#include "lib/utils/PBUtils.h"
#include "lib/utils/datetime.h"
@@ -23,7 +23,7 @@
#include <boost/core/addressof.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <catch/catch.hpp>
#include <catch2/catch.hpp>
#include <chrono>
#include <cstdint>
#include <cstdlib>
+2 -1
View File
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/jetfix/common/InMsgBuffer.h"
#include "lib/jetfix/connection/AsyncReader.h"
@@ -7,6 +7,7 @@
#include "lib/jetfix/tests/sample_fix.h"
#include <fstream>
#include <sstream>
namespace bts {
namespace jetfix {
+1 -1
View File
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/jetfix/codec/FIXFragment.h"
#include "lib/jetfix/codec/FIXMsg.h"
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/jetfix/codec/FIXEncodingStream.h"
#include <fstream>
+1 -1
View File
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/jetfix/codec/FIXFragment.h"
#include "lib/jetfix/codec/Fields.h"
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/jetfix/codec/FIXFragment.h"
#include "lib/jetfix/codec/FIXMsg.h"
+1 -1
View File
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/jetfix/codec/FIXEncodingStream.h"
#include "lib/jetfix/common/InMsgBuffer.h"
+1 -1
View File
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/config/config.h"
#include "lib/config/protos/logging.pb.h"
#include "lib/utils/bts_chrono.h"
+1 -1
View File
@@ -14,7 +14,7 @@
#include <boost/filesystem.hpp>
#include <iostream>
#include <mutex>
#include <pugixml/pugixml.hpp>
#include <pugixml.hpp>
using namespace std;
using namespace bts::api;
+1 -1
View File
@@ -12,7 +12,7 @@
#include "lib/config/protos/system.pb.h"
#include <boost/filesystem.hpp>
#include <pugixml/pugixml.hpp>
#include <pugixml.hpp>
using namespace std;
using namespace bts::api;
+1 -2
View File
@@ -2,7 +2,7 @@
#include "../IntPrice.h"
#include "../MBOProcessor.h"
#include "Co2TestInstrument.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/utils/Shuffle.h"
#include <algorithm>
@@ -154,7 +154,6 @@ TEST_CASE("MBO sort order", "[md][mbo]") {
// multiple updates at the same price
for (unsigned x = 0; x < 100; ++x) {
// bid
auto p = 1000 + x;
updates.push_back(inc::Update{
ExchangeOrderKey(1000 + x),
1000 + x,
+1 -1
View File
@@ -5,7 +5,7 @@
#include "../coconut2.h"
#include "../relay/QueryServer.h"
#include "Co2TestInstrument.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/config/config.h"
#include "lib/metrics/metrics.h"
#include "lib/os/os.h"
@@ -1,7 +1,7 @@
#ifndef _WIN32
#include "../MDConsumerHandle.h"
#include "Co2TestInstrument.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/utils/sane_algorithm.h"
#include "md_test_utils.h"
#include <algorithm>
@@ -1,6 +1,8 @@
#pragma once
#include "../IL3Dispatcher.h"
#include "../IL3ReceiveBuffer.h"
#include <catch2/catch.hpp>
#include <functional>
#include <queue>
#include <string>
@@ -217,7 +219,6 @@ struct IL3TestExchange {
// todo: check sender seq #
REQUIRE(msg.seqNum() == this->expected_seq);
this->expected_seq += 1;
ExchangeOrder order;
auto id = this->next_order_id += 1;
this->orders[id] = ExchangeOrder{id, 0, msg.orderQty(), msg.securityID()};
@@ -1,5 +1,3 @@
#include "catch/catch.hpp"
#include "../IL3GW.h"
#include "../IL3MessageFramer.h"
#include "../IL3ReceiveBuffer.h"
@@ -11,6 +9,7 @@
#include "lib/domain_model/Security.h"
#include "lib/utils/SecureLogon.h"
#include <catch2/catch.hpp>
#include <optional>
#include <random>
#include <variant>
@@ -1,4 +1,4 @@
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/api/service_helpers/AdminServiceUtils.h"
#include "lib/api/services/AdminService.server.pb.h"
#include "lib/config/config.h"
@@ -1,5 +1,5 @@
#include "AlgoTestDriver.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/api/services/OrderService.pb.h"
#include "lib/logging/logging.h"
#include "lib/md/relay/RelayRecorder.h"
@@ -1,4 +1,3 @@
#include "catch/catch.hpp"
#include "lib/api/services/OrderService.pb.h"
#include "lib/domain_model/Security.h"
#include "lib/orderman/orderman_utils/Book.h"
@@ -15,6 +14,7 @@
#include "lib/sparkproto/SparkProtos.pb.h"
#include "lib/utils/PBUtils.h"
#include <array>
#include <catch2/catch.hpp>
#include <cmath>
#include <functional>
#include <iostream>
@@ -241,4 +241,4 @@ TEST_CASE("test_activation_thresholds.", "[algo][limit_cover]") {
} // namespace limit_cover
} // namespace test
} // namespace orderman
} // namespace bts
} // namespace bts
@@ -1,6 +1,6 @@
#include "../DormanAlgo.h"
#include "AlgoTestDriver.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/domain_model/Security.h"
#include "lib/orderman/orderman_utils/Book.h"
#include "lib/orderman/orderman_utils/orderman_utils.h"
@@ -1,5 +1,5 @@
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/LimitCoverState.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/domain_model/Security.h"
#include "lib/md/IntPrice.h"
#include "lib/orderman/order_factory/IOrderFactory.h"
@@ -197,4 +197,4 @@ LimitCoverState::ValidateDeployment::~ValidateDeployment() {
} // namespace limit_cover
} // namespace test
} // namespace orderman
} // namespace bts
} // namespace bts
@@ -1,8 +1,9 @@
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/TestSteps.h"
#include "catch/catch.hpp"
#include "lib/api/services/OrderService.pb.h"
#include "lib/orderman/order_factory/IOrderFactory.h"
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/LimitCoverTestUtils.h"
#include <catch2/catch.hpp>
#include <functional>
#include <iostream>
#include <optional>
@@ -108,7 +109,6 @@ void breech_activation_thresh(
while (thresh_count-- > 0 && gate_it != state.gates().end())
gate_it++;
auto thresh = gate_it->first + offset;
int gi = 1;
auto &bs = book.side(state.side());
if (bs[0].size() == 0) {
bs[0] = price_size(state.limit_price(), thresh);
@@ -231,4 +231,4 @@ void CancelAlgo::execute_core(LimitCoverState &state) const {
} // namespace limit_cover
} // namespace test
} // namespace orderman
} // namespace bts
} // namespace bts
@@ -1,5 +1,5 @@
#pragma once
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/api/services/OrderService.pb.h"
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/LimitCoverState.h"
#include <functional>
@@ -134,4 +134,4 @@ struct Custom : public ITestStep {
} // namespace limit_cover
} // namespace test
} // namespace orderman
} // namespace bts
} // namespace bts
@@ -1,7 +1,7 @@
#include "../SplitterAlgo.h"
#include "AlgoTestDriver.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/orderman/orderman_utils/Book.h"
#include "lib/utils/bts_chrono.h"
#include <ctime>
@@ -78,7 +78,8 @@ bool SpreaderUtils::resolve_synthetic_spread(
for (auto it = sec.synthetic().legs().begin();
it != sec.synthetic().legs().end(); ++it) {
const bts::api::ContractLeg &leg = *it;
if (leg.security().has_future() || leg.security().has_spread()) {
if (leg.security().has_future() || leg.security().has_spread() ||
leg.security().has_option()) {
const bts::api::Security *leg_sec_ptr =
spreader_pao_services.resolve(
bts::SecurityKey(leg.security().id()));
@@ -328,9 +328,7 @@ TEST_CASE("spreader bookkeeping data", "[spreader]") {
uint32_t sec_key_1 = 1111, sec_key_2 = 2222, sec_key_3 = 3333;
double lean_ratio_1 = 1.33, lean_ratio_2 = 5.0, lean_ratio_3 = 2.75;
double price_mult_1 = -2.5, price_mult_2 = 5.0, price_mult_3 = -3.33;
Price spread_price(-0.35);
Quantity spread_quantity(125);
OrderKey order_key_1(4), order_key_2(22), order_key_3(2007);
// security
ContractLeg leg_1, leg_2, leg_3;
fill_future_contract_leg(
@@ -1354,8 +1352,6 @@ TEST_CASE("quoter_WAITING_FOR_CANCEL_ACK", "[spreader]") {
"quoter_WAITING_FOR_CANCEL_ACK.update_order_status_terminal");
}
SECTION("3. on_book") {
double zero_prices[] = {0, 0, 0, 0, 0};
uint16_t zero_sizes[] = {0, 0, 0, 0, 0};
fire_book_update(prices, sizes, api::Side::SIDE_SELL, 1, sm, quoter);
// any
REQUIRE(
@@ -1886,7 +1882,6 @@ TEST_CASE("hedger_START_state", "[spreader]") {
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
SpreaderManagerForTest &sm = *sm_ptr;
ChildOrder co;
SingleFillHedger &hedger =
@@ -1944,7 +1939,6 @@ TEST_CASE("hedger_WAITING_FOR_FIRST_ACK_state", "[spreader]") {
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
SpreaderManagerForTest &sm = *sm_ptr;
ChildOrder co;
// SingleFillHedger hedger (sm, sm.get_leg_data (1), co, hedger_price,
@@ -2015,7 +2009,6 @@ TEST_CASE("hedger_WAITING_FOR_FIRST_ACK_CANCELLED_state", "[spreader]") {
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
SpreaderManagerForTest &sm = *sm_ptr;
ChildOrder co;
SingleFillHedger &hedger =
@@ -2093,7 +2086,6 @@ TEST_CASE("hedger_WAITING_FOR_CANCEL_ACK_state", "[spreader]") {
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
SpreaderManagerForTest &sm = *sm_ptr;
ChildOrder co;
SingleFillHedger &hedger =
@@ -2194,7 +2186,6 @@ TEST_CASE("hedger_END_state", "[spreader]") {
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
SpreaderManagerForTest &sm = *sm_ptr;
ChildOrder co;
SingleFillHedger &hedger =
@@ -2262,7 +2253,6 @@ TEST_CASE("hedger_WORKING", "[spreader]") {
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
SpreaderManagerForTest &sm = *sm_ptr;
ChildOrder co;
SingleFillHedger &hedger =
@@ -2383,8 +2373,6 @@ TEST_CASE("spreader_START", "[spreader]") {
SECTION("1. on_init_new.resolved") {
spreader.test_only_on_init_new(order_def, pao_services);
REQUIRE(spreader.test_only_func_spreader_state() == SpreaderState::START);
SpreaderBookkeepingData &bookeeping_data =
spreader.test_only_func_spreader_full_data();
REQUIRE(
bookkeeping_data.get_leg_data(0).leg_property_data().security_key() ==
2468);
@@ -2658,8 +2646,7 @@ TEST_CASE("spreader_WORKING", "[spreader]") {
// comes out to be at 2002, which gives leg1 = spreader_price + leg2 = 1 +
// 2002 = 2003. changing leg 2's books such that 15 still comes at 2002
uint32_t leg_1_id = leg_data_1.leg_property_data().security_key(),
leg_2_id = leg_data_2.leg_property_data().security_key();
uint32_t leg_2_id = leg_data_2.leg_property_data().security_key();
bts::orderman::Book modified_book = get_book(
SecurityKey(leg_2_id), 5, new double[5]{2004, 2003, 2002, 2001, 2000},
new uint16_t[5]{5, 5, 5, 0, 0},
@@ -3755,8 +3742,6 @@ TEST_CASE("nlegs_compute_driver", "[spreader]") {
SpreaderManagerForTest spreader_manager(
order_key, order_def, pao_services, leg_props, quoter_ord_defs,
hedger_ord_defs);
SpreaderBookkeepingData &bookkeeping_data =
spreader_manager.bookkeeping_data();
SECTION("compute_1") {
Quantity quoting_leg_target(300);
Price spread_price(0.25);
@@ -3895,8 +3880,6 @@ TEST_CASE("nlegs_crossed_hedges", "[spreader]") {
SpreaderManagerForTest spreader_manager(
order_key, order_def, pao_services, leg_props, quoter_ord_defs,
hedger_ord_defs);
SpreaderBookkeepingData &bookkeeping_data =
spreader_manager.bookkeeping_data();
fill_book(
spreader_manager, 0, new double[5]{65.31, 65.32, 65.34, 65.36, 65.40},
@@ -3999,8 +3982,6 @@ TEST_CASE("nlegs_crossed_hedges", "[spreader]") {
SpreaderManagerForTest spreader_manager(
order_key, order_def, pao_services, leg_props, quoter_ord_defs,
hedger_ord_defs);
SpreaderBookkeepingData &bookkeeping_data =
spreader_manager.bookkeeping_data();
fill_book(
spreader_manager, 0, new double[5]{62.1, 62, 61.99, 61.95, 61.93},
@@ -4200,7 +4181,6 @@ TEST_CASE("spreader_perf_2legs", "[spreader]") {
spreader.test_only_func_spreader_full_data();
verify_basic_spreader_state(
spreader, SpreaderState::WORKING, spreader_price, spreader_quantity);
SpreaderLegData &leg_data_1 = bookkeeping_data.get_leg_data(0);
SpreaderLegData &leg_data_2 = bookkeeping_data.get_leg_data(1);
verify_complete_quoter_state(
leg_data_2.quoter(), QuoterState::WAITING_FOR_SIZE, false,
@@ -5176,7 +5156,7 @@ TEST_CASE("net_change_transformation", "[spreader]") {
}
}
TEST_CASE("sniper", "[spreader]") {
TEST_CASE("sniper", "[spreader_broken]") {
SECTION("sweep") {
Book bk = get_book(
SecurityKey(10), 5, new double[5]{50, 40, 30, 20, 10},
@@ -1,7 +1,4 @@
#pragma once
#include <catch/catch.hpp>
#include <map>
#include "lib/domain_model/Security.h"
#include "lib/orderman/securities/ISecurityDB.h"
#include "lib/utils/bts_chrono.h"
@@ -16,8 +13,11 @@
#include "lib/utils/PBUtils.h"
#include "lib/utils/bts_chrono.h"
#include "lib/utils/datetime.h"
#include <algorithm>
#include <catch2/catch.hpp>
#include <google/protobuf/util/message_differencer.h>
#include <map>
namespace bts {
namespace orderman {
+1 -1
View File
@@ -1,5 +1,5 @@
#include "lib/mercury/common/FatWrapper.h"
#include <catch/catch.hpp>
#include <catch2/catch.hpp>
namespace bts {
namespace mercury {
@@ -1,5 +1,3 @@
#include "catch/catch.hpp"
#include "../PersistenceServiceServer.h"
#include "lib/api/public/ServiceContext.h"
#include "lib/api/services/PersistenceService.client.pb.h"
@@ -9,6 +7,7 @@
#include "lib/utils/bts_chrono.h"
#include <boost/filesystem.hpp>
#include <catch2/catch.hpp>
#include <future>
namespace bts {
@@ -1,8 +1,8 @@
#include "catch/catch.hpp"
#include "lib/os/os.h"
#include "lib/quickbus/quickbus.h"
#include "lib/utils/bts_chrono.h"
#include <catch2/catch.hpp>
#include <chrono>
#include <future>
+1 -1
View File
@@ -1,10 +1,10 @@
#include "catch/catch.hpp"
#include "lib/os/os.h"
#include "lib/quickbus/quickbus.h"
#include "lib/utils/TimeStamp.h"
#include "lib/utils/benchmarking_utils.h"
#include <atomic>
#include <catch2/catch.hpp>
#include <chrono>
#include <future>
+1 -2
View File
@@ -1,9 +1,8 @@
#include "catch/catch.hpp"
#include "lib/quickbus/quickbus.h"
#include "lib/quickbus/routing/Router.h"
#include <boost/signals2.hpp>
#include <catch2/catch.hpp>
namespace bts {
int quickbus_tests = 0;
+2 -3
View File
@@ -1,14 +1,13 @@
#define CATCH_CONFIG_RUNNER
#include "catch_test_runner.h"
#include "catch/catch.hpp"
#include "lib/config/config.h"
#include "lib/config/protos/logging.pb.h"
#include "lib/logging/logging.h"
#include "lib/utils/bts_assert.h"
#include "lib/utils/is_unittest_environment.h"
#include <catch2/catch.hpp>
namespace bts {
int run_tests(int argc, char **argv) {
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef _WIN32
#include "../AuthToken.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include "lib/config/config.h"
namespace bts {
namespace test {
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef _WIN32
#include "../Puid.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
namespace bts {
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef _WIN32
#include "lib/utils/MathUtils.h"
#include <catch/catch.hpp>
#include <catch2/catch.hpp>
namespace bts::tests {
@@ -1,5 +1,5 @@
#include "../ConcurrentAppendCollection.h"
#include "catch/catch.hpp"
#include <catch2/catch.hpp>
#include <thread>
namespace bts {
@@ -95,4 +95,4 @@ TEST_CASE("ConcurrentAppendCollection", "[collection]") {
}
}
} // namespace bts
} // namespace bts
+5
View File
@@ -25,6 +25,9 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src/server/sparkd/cmds/spartan ${emumba-deribit-connector-library_INCLUDE_DIRS})
target_link_directories(sparkd BEFORE PRIVATE ${quickfix_LIBRARY_DIR})
target_include_directories(sparkd SYSTEM PRIVATE ${quickfix_INCLUDE_DIR})
find_package(PkgConfig REQUIRED)
pkg_check_modules(emumba-deribit-connector-library REQUIRED emumba-deribit-connector)
@@ -73,7 +76,9 @@ target_link_libraries(
-static-libgcc
-static-libstdc++
ACE
Catch2
Common++
CLI11
OnixS.IceImpactMulticastPriceFeedHandlerCpp
Packet++
Pcap++
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::crypto {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -3,7 +3,7 @@
#ifdef SPARK_ENABLE_CCAPI
#include "LiveLadderDemoCmd.h"
#endif
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
namespace bts::cmds {
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
@@ -2,7 +2,7 @@
#include "DeribitDemo.h"
#include "lib/config/config.h"
#include "lib/os/os.h"
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <functional>
#include <optional>
#include <string>
@@ -1,5 +1,5 @@
#pragma once
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <memory>
namespace bts::cmds {
@@ -8,7 +8,7 @@
#include "server/sparkd/cmds/common/Validators.h"
#include "server/sparkd/cmds/crypto/LiveLadderDemo.h"
#include "server/sparkd/cmds/spartan/utils/FileUtils.h"
#include <CLI11/CLI11.hpp>
#include <CLI/CLI.hpp>
#include <optional>
namespace bts::cmds {
Loaded 100 of 154 files, more files were not shown because too many files have changed in this diff. Show more