Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9fdbc2acd | ||
|
|
a50e0cfc26 |
No files matched your search
@@ -1,14 +1,10 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using mbts.analytics;
|
|
||||||
using bts.api;
|
|
||||||
using mbts.ui;
|
|
||||||
using MathNet.Numerics.Providers.FourierTransform;
|
|
||||||
using BCG;
|
|
||||||
using System.Windows.Automation;
|
|
||||||
using bts.collections;
|
|
||||||
|
|
||||||
namespace mbts.spark {
|
namespace mbts.spark {
|
||||||
|
using bts.api;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
|
||||||
// A lot of options data (migrated from edge) is not normalized
|
// A lot of options data (migrated from edge) is not normalized
|
||||||
// on the sec_id, but rather on a combination of symbol, exp, strike.
|
// on the sec_id, but rather on a combination of symbol, exp, strike.
|
||||||
@@ -20,6 +16,9 @@ namespace mbts.spark {
|
|||||||
|
|
||||||
public static IDictionary<UInt32, DriverMD> normalize_drivers(
|
public static IDictionary<UInt32, DriverMD> normalize_drivers(
|
||||||
OptionDriverPriceMap driver_map, SystemContractData sc_data) {
|
OptionDriverPriceMap driver_map, SystemContractData sc_data) {
|
||||||
|
if (driver_map is null) {
|
||||||
|
return new Dictionary<uint, DriverMD>(0);
|
||||||
|
}
|
||||||
Dictionary<UInt32, DriverMD> rv = new Dictionary<uint, DriverMD>();
|
Dictionary<UInt32, DriverMD> rv = new Dictionary<uint, DriverMD>();
|
||||||
foreach (var kv in driver_map.get_price_map()) {
|
foreach (var kv in driver_map.get_price_map()) {
|
||||||
var exp = kv.Key;
|
var exp = kv.Key;
|
||||||
@@ -40,6 +39,9 @@ namespace mbts.spark {
|
|||||||
}
|
}
|
||||||
public static IEnumerable<Tuple<SecurityImmutable, TheoPoint>> normalize_interp_theos(
|
public static IEnumerable<Tuple<SecurityImmutable, TheoPoint>> normalize_interp_theos(
|
||||||
OptionTheoInterpolationData symbol_theos, SystemContractData sc_data) {
|
OptionTheoInterpolationData symbol_theos, SystemContractData sc_data) {
|
||||||
|
if (symbol_theos is null) {
|
||||||
|
return Enumerable.Empty<Tuple<SecurityImmutable, TheoPoint>>();
|
||||||
|
}
|
||||||
var rv = new List<Tuple<SecurityImmutable, TheoPoint>>();
|
var rv = new List<Tuple<SecurityImmutable, TheoPoint>>();
|
||||||
foreach (DateTime exp in symbol_theos.get_expirations()) {
|
foreach (DateTime exp in symbol_theos.get_expirations()) {
|
||||||
Dictionary<double, Dictionary<double, TheoPoint>> exp_data =
|
Dictionary<double, Dictionary<double, TheoPoint>> exp_data =
|
||||||
@@ -65,4 +67,4 @@ namespace mbts.spark {
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,10 +44,11 @@
|
|||||||
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="PanelItem.TickUpDown.Parameterless" TargetType="c:TickUpDown">
|
<Style x:Key="PanelItem.TickUpDown.Parameterless" TargetType="c:TickUpDown" BasedOn="{StaticResource {x:Type c:TickUpDown}}">
|
||||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Foreground" Value="{u:BTSBrush UI.default_text}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
<Setter Property="TickUpCommandParameter" Value="{u:True}" />
|
<Setter Property="TickUpCommandParameter" Value="{u:True}" />
|
||||||
<Setter Property="TickDownCommandParameter" Value="{u:False}" />
|
<Setter Property="TickDownCommandParameter" Value="{u:False}" />
|
||||||
|
|||||||
@@ -61,10 +61,6 @@
|
|||||||
<Setter Property="Background" Value="{u:BTSBrush UI.ScrollBar.background}"/>
|
<Setter Property="Background" Value="{u:BTSBrush UI.ScrollBar.background}"/>
|
||||||
<Setter Property="Foreground" Value="{u:BTSBrush UI.ScrollBar.foreground}"/>
|
<Setter Property="Foreground" Value="{u:BTSBrush UI.ScrollBar.foreground}"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="RepeatButton">
|
|
||||||
<Setter Property="Background" Value="{u:BTSBrush UI.RepeatButton.background}"/>
|
|
||||||
<Setter Property="Foreground" Value="{u:BTSBrush UI.RepeatButton.foreground}"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="StatusBar">
|
<Style TargetType="StatusBar">
|
||||||
<Setter Property="Background" Value="{u:BTSBrush UI.StatusBar.background}"/>
|
<Setter Property="Background" Value="{u:BTSBrush UI.StatusBar.background}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -904,11 +904,7 @@ namespace mbts.ui {
|
|||||||
public static BTSColor background => UI.default_background;
|
public static BTSColor background => UI.default_background;
|
||||||
public static BTSColor foreground => thumb_static;//UI.default_text;
|
public static BTSColor foreground => thumb_static;//UI.default_text;
|
||||||
}
|
}
|
||||||
public static class RepeatButton {
|
|
||||||
public static BTSColor background => UI.default_background;
|
|
||||||
public static BTSColor foreground => UI.black;
|
|
||||||
public static BTSColor border => UI.default_text;
|
|
||||||
}
|
|
||||||
public static class StatusBarItem {
|
public static class StatusBarItem {
|
||||||
public static BTSColor foreground => UI.default_text;
|
public static BTSColor foreground => UI.default_text;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="/view/Colors.xaml" />
|
<ResourceDictionary Source="/view/Colors.xaml" />
|
||||||
<ResourceDictionary Source="/view/Resources/Converters.xaml" />
|
<ResourceDictionary Source="/view/Resources/Converters.xaml" />
|
||||||
|
<ResourceDictionary Source="/view/Resources/Buttons.xaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
<Style TargetType="{x:Type c:TickUpDown}">
|
<Style TargetType="{x:Type c:TickUpDown}">
|
||||||
@@ -55,8 +56,8 @@
|
|||||||
<Path
|
<Path
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Fill="{u:BTSBrush UI.RepeatButton.foreground}"
|
|
||||||
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
||||||
|
Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=RepeatButton}}"
|
||||||
RenderTransformOrigin="0.5,0.5">
|
RenderTransformOrigin="0.5,0.5">
|
||||||
<Path.RenderTransform>
|
<Path.RenderTransform>
|
||||||
<RotateTransform Angle="180" />
|
<RotateTransform Angle="180" />
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
<Path
|
<Path
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Fill="{u:BTSBrush UI.RepeatButton.foreground}"
|
Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=RepeatButton}}"
|
||||||
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" />
|
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" />
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -110,16 +111,23 @@
|
|||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
/>
|
/>
|
||||||
<RepeatButton Command="{TemplateBinding TickUpCommand}" CommandParameter="{TemplateBinding TickUpCommandParameter}" BorderThickness="0" Focusable="False" Visibility="Hidden">
|
<RepeatButton Command="{TemplateBinding TickUpCommand}" CommandParameter="{TemplateBinding TickUpCommandParameter}" BorderThickness="0" Focusable="False" Visibility="Hidden">
|
||||||
<Path Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
<Path
|
||||||
Fill="{u:BTSBrush UI.RepeatButton.foreground}" HorizontalAlignment="Right" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=RepeatButton}}"
|
||||||
|
RenderTransformOrigin="0.5,0.5"
|
||||||
|
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z">
|
||||||
<Path.RenderTransform>
|
<Path.RenderTransform>
|
||||||
<RotateTransform Angle="180" />
|
<RotateTransform Angle="180" />
|
||||||
</Path.RenderTransform>
|
</Path.RenderTransform>
|
||||||
</Path>
|
</Path>
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
<RepeatButton Command="{TemplateBinding TickDownCommand}" CommandParameter="{TemplateBinding TickDownCommandParameter}" BorderThickness="0" Focusable="False" Visibility="Hidden">
|
<RepeatButton Command="{TemplateBinding TickDownCommand}" CommandParameter="{TemplateBinding TickDownCommandParameter}" BorderThickness="0" Focusable="False" Visibility="Hidden">
|
||||||
<Path Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
<Path
|
||||||
Fill="{u:BTSBrush UI.RepeatButton.foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=RepeatButton}}"
|
||||||
|
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" />
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
>
|
>
|
||||||
<Path
|
<Path
|
||||||
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
||||||
Fill="#FF606060"
|
Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=RepeatButton}}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
RenderTransformOrigin="0.5,0.5"
|
RenderTransformOrigin="0.5,0.5"
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
>
|
>
|
||||||
<Path
|
<Path
|
||||||
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
|
||||||
Fill="#FF606060"
|
Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=RepeatButton}}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -551,9 +551,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="RepeatButton">
|
<Style TargetType="RepeatButton">
|
||||||
<Setter Property="Foreground" Value="{u:BTSBrush UI.RepeatButton.foreground}" />
|
<Setter Property="Foreground" Value="{u:BTSBrush UI.Button.normal_foreground}" />
|
||||||
<Setter Property="Background" Value="{u:BTSBrush UI.RepeatButton.background}" />
|
<Setter Property="Background" Value="{u:BTSBrush UI.Button.normal_background}" />
|
||||||
<Setter Property="BorderBrush" Value="{u:BTSBrush UI.RepeatButton.border}" />
|
<Setter Property="BorderBrush" Value="{u:BTSBrush UI.Button.normal_border}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
|
|||||||
Reference in new issue
Block a user