Merged in help (pull request #63)
Synthetic Help Buttons Approved-by: Eric Harding <eric.harding@bluetradesys.com>
This commit is contained in:
commit
dc9dd81a44
34 files changed
+113
-30
No files matched your search
@@ -264,7 +264,20 @@
|
||||
ConverterParameter={x:Static DataGridHeadersVisibility.Row},
|
||||
Converter={x:Static DataGrid.HeadersVisibilityConverter},
|
||||
RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
/>
|
||||
>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding display_name}" />
|
||||
<c:HelpButton
|
||||
x:Name="row_helpbutton"
|
||||
ToolTip="{Binding help_text}"
|
||||
Opacity="0"
|
||||
Visibility="{Binding help_text, Converter={StaticResource NullToVisibilityConverter}}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Margin="3,0,0,0"
|
||||
/>
|
||||
</StackPanel>
|
||||
</DataGridRowHeader>
|
||||
<DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</SelectiveScrollingGrid>
|
||||
</Border>
|
||||
@@ -273,6 +286,9 @@
|
||||
<Setter Property="BorderBrush" Value="Red"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Opacity" TargetName="row_helpbutton" Value="1"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="DataGridRowStyle" TargetType="DataGridRow">
|
||||
|
||||
@@ -35,9 +35,10 @@ namespace mbts.ui.spark {
|
||||
static ExecutionStrategyEditor() =>
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(ExecutionStrategyEditor), new FrameworkPropertyMetadata(typeof(ExecutionStrategyEditor)));
|
||||
|
||||
public ExecutionStrategyEditor() =>
|
||||
public ExecutionStrategyEditor() {
|
||||
AdornerHelper.attach_continuously_on_loaded(() => new ExecutionStrategyErrorAdorner(this), this);
|
||||
|
||||
ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue));
|
||||
}
|
||||
#region SyntheticName
|
||||
public static readonly DependencyProperty SyntheticNameProperty = DependencyProperty.Register("SyntheticName", typeof(string), typeof(ExecutionStrategyEditor),
|
||||
new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
|
||||
@@ -180,7 +181,7 @@ namespace mbts.ui.spark {
|
||||
#region ContractPickerModel
|
||||
public static readonly DependencyProperty ContractPickerModelProperty = DependencyProperty.Register(nameof(ContractPickerModel), typeof(mbts.spark.ContractPickerModel), typeof(ExecutionStrategyEditor));
|
||||
public mbts.spark.ContractPickerModel ContractPickerModel { get => GetValue(ContractPickerModelProperty) as mbts.spark.ContractPickerModel; set => SetValue(ContractPickerModelProperty, value); }
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
public override void OnApplyTemplate() =>
|
||||
_connect_leg_tuples();
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
x:Name="PART_Description_HelpButton"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Command="{Binding ToggleShowDescription, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
|
||||
Margin="3,0,0,0"
|
||||
Opacity="0"
|
||||
Visibility="{Binding Description, Converter={StaticResource EmptyStringVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ToolTip="{Binding Description, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
</BlockUIContainer>
|
||||
|
||||
@@ -6,6 +6,8 @@ namespace mbts.spark {
|
||||
partial class SyntheticEditorVM {
|
||||
class IsQuoteModel : RowModelBase<bool> {
|
||||
public override string display_name { get; } = "Enable Quoting";
|
||||
public override string help_text { get; } = "This parameter is in the form of a check box, where if the box is checked the leg will be quoted versus not checked, it will not be shown in the market. If it is not actively quoted in the market, the leg will still be used for calculation of the entire synthetic.";
|
||||
public override string man_page { get; } = string.Empty;
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
leg_tup.leg_params.IsActiveQuoting;
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
using mbts.ui.spark;
|
||||
using System;
|
||||
|
||||
namespace mbts.spark {
|
||||
partial class SyntheticEditorVM {
|
||||
class HedgeRatioModel : RowModelBase<double> {
|
||||
public override string display_name { get; } = "Hedge Ratio";
|
||||
public override string display_name { get; } = "Lean Qty Factor";
|
||||
public override string help_text { get; } = "This is the ratio multiplier that defines how much volume you require in that leg before leaning off it. For example, if you are looking to buy 4 ES and sell 2 NQ, if your hedge ratio is 1, you will work the ES leg at where you could get filled on 2 NQ. If your Hedge Ratio is 3 on the NQ leg, then you’ll work the ES order based on where you could fill 6 (2 (Qty of NQ) * 3 (Hedge Ratio)).";
|
||||
public override string man_page { get; } = string.Empty;
|
||||
|
||||
public override double get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
leg_tup.leg_params.QuoteParams.LeanQuantityRatio;
|
||||
|
||||
public override void set_value(LegSpreaderParamsTuple leg_tup, double value) =>
|
||||
leg_tup.leg_params.QuoteParams.LeanQuantityRatio = value;
|
||||
leg_tup.leg_params.QuoteParams.LeanQuantityRatio = Math.Abs(value);
|
||||
|
||||
public override ICell create_cell(LegSpreaderParamsTuple leg_tup) => new HedgeRatioCell(this, leg_tup);
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace mbts.spark {
|
||||
|
||||
public override bool read_only { get; }
|
||||
public override string display_name { get; } = "Price Multiplier";
|
||||
public override string help_text { get; } = "This is multiplier at which the synthetic will be priced, by default, it’ll be based on the same as the quantity of the synthetic produced, but you can change it to modify the balance of the price, giving more weighting to one leg over another.";
|
||||
public override string man_page { get; } = string.Empty;
|
||||
|
||||
public override double get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
leg_tup.leg.PriceMultiplier;
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace mbts.spark {
|
||||
public event Action quantity_changed;
|
||||
public override bool read_only { get; }
|
||||
public override string display_name { get; } = "Quantity";
|
||||
public override string help_text { get; } = "This is the number of contracts of the security you would like to be included in the calculation of the synthetic as well as a buy or sell. By default, the first leg will come up as a buy and the second leg a sell. Sells are represented “-1”";
|
||||
public override string man_page { get; } = string.Empty;
|
||||
|
||||
public override double get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
leg_tup.leg.Side == Side.Buy ? leg_tup.leg.Quantity : -leg_tup.leg.Quantity;
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Cross Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.OppositeMarketVolumeBasedCross };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.OppositeMarketVolumeBasedCross };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, QuantityMeasure> _value_store = new Dictionary<uint, QuantityMeasure>();
|
||||
|
||||
public override string display_name { get; } = "Threshold";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.OppositeMarketVolumeBasedCross };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.TicksAwayCross };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Cross Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.TicksAwayCross };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.TicksAwayCross };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.TimeBasedCross };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Cross Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.TimeBasedCross };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Time(ms)";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PostHedge, Subsections.TimeBasedCross };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -4,6 +4,8 @@ namespace mbts.spark {
|
||||
partial class SyntheticEditorVM {
|
||||
class MaxTicksInsideMarketModel : RowModelBase<uint> {
|
||||
public override string display_name { get; } = "Max Inside Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge };
|
||||
|
||||
public override uint get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge, Subsections.Payless };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, QuantityMeasure> _value_store = new Dictionary<uint, QuantityMeasure>();
|
||||
|
||||
public override string display_name { get; } = "Threshold";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge, Subsections.Payless };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+3
@@ -10,6 +10,9 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Payless Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge, Subsections.Payless };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge, Subsections.Payup };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, QuantityMeasure> _value_store = new Dictionary<uint, QuantityMeasure>();
|
||||
|
||||
public override string display_name { get; } = "Threshold";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge, Subsections.Payup };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Payup Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.PreHedge, Subsections.Payup };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.Quote, Subsections.InsideMarketThrottleThresholds };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Min Move";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.Quote, Subsections.InsideMarketThrottleThresholds };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.Quote, Subsections.InsideMarketThrottleThresholds };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public override string display_name { get; } = string.Empty;
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.Quote, Subsections.Throttle };
|
||||
|
||||
public override bool get_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Inside Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.Quote, Subsections.Throttle };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ namespace mbts.spark {
|
||||
IDictionary<uint, uint> _value_store = new Dictionary<uint, uint>();
|
||||
|
||||
public override string display_name { get; } = "Outside Ticks";
|
||||
public override string help_text { get; } = string.Empty;
|
||||
public override string man_page { get; } = string.Empty;
|
||||
public override ParameterSection[] section_path { get; } = new[] { Sections.Quote, Subsections.Throttle };
|
||||
|
||||
public void apply_value(LegSpreaderParamsTuple leg_tup) =>
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace mbts.spark {
|
||||
partial class SyntheticEditorVM {
|
||||
internal interface IRowModel {
|
||||
string display_name { get; }
|
||||
string help_text { get; }
|
||||
bool read_only { get; }
|
||||
ParameterSection[] section_path { get; }
|
||||
bool has_errors(IReadOnlyCollection<LegSpreaderParamsTuple> leg_tups);
|
||||
@@ -38,7 +39,7 @@ namespace mbts.spark {
|
||||
internal interface IHaveFontParams {
|
||||
FontWeight font_weight { get; }
|
||||
}
|
||||
|
||||
|
||||
abstract class RowModelBase<T> : ViewModelBase, IRowModel {
|
||||
readonly Dictionary<uint, ReplaySubject<bool>> _enabled_store = new Dictionary<uint, ReplaySubject<bool>>();
|
||||
readonly Dictionary<uint, Subject<T>> _override_value_store = new Dictionary<uint, Subject<T>>();
|
||||
@@ -46,6 +47,8 @@ namespace mbts.spark {
|
||||
protected RowModelBase() { }
|
||||
|
||||
public abstract string display_name { get; }
|
||||
public abstract string help_text { get; }
|
||||
public abstract string man_page { get; }
|
||||
public virtual bool read_only { get; } = false;
|
||||
public virtual ParameterSection[] section_path { get; } = new ParameterSection[0];
|
||||
public virtual bool has_errors(IReadOnlyCollection<LegSpreaderParamsTuple> leg_tups) => false;
|
||||
@@ -97,41 +100,41 @@ namespace mbts.spark {
|
||||
private static class Subsections {
|
||||
public static ParameterSection Throttle =>
|
||||
new ParameterSection("Throttle", true,
|
||||
"reduces re-quoting updates by defining a region on either side " +
|
||||
"Reduces re-quoting updates by defining a region on either side " +
|
||||
"of the working quoting order, inside which quote updates will not be sent.");
|
||||
|
||||
public static ParameterSection InsideMarketThrottleThresholds =>
|
||||
new ParameterSection("Inside Market Throttle Thresholds", true,
|
||||
"reduces re-quoting for quotes that are moving toward the inside market. " +
|
||||
"Reduces re-quoting for quotes that are moving toward the inside market. " +
|
||||
"Orders moving toward the inside market are not re-quoted if:\n\n" +
|
||||
"i. New order is more than 'Ticks' away from the inside market or\n" +
|
||||
"ii. New order has not moved 'Min Move' away from the current price");
|
||||
|
||||
public static ParameterSection Payless =>
|
||||
new ParameterSection("Pay Less", true,
|
||||
"when the quantity at the level of the calculated hedge price is more than " +
|
||||
"When the quantity at the level of the calculated hedge price is more than " +
|
||||
"'Threshold,' the hedge order is paid less by 'Payless Ticks.'");
|
||||
|
||||
public static ParameterSection Payup =>
|
||||
new ParameterSection("Pay Up", true,
|
||||
"when the quantity at the level of the calculated hedge price is less than " +
|
||||
"When the quantity at the level of the calculated hedge price is less than " +
|
||||
"'Threshold,' then the hedge order is paid up by 'Payup Ticks.'");
|
||||
|
||||
public static ParameterSection TicksAwayCross =>
|
||||
new ParameterSection("Ticks Away Cross", true,
|
||||
"forces legged hedging orders to automatically cross the market if they get too " +
|
||||
"Forces legged hedging orders to automatically cross the market if they get too " +
|
||||
"far away from the opposite inside market.If a legged hedge order's price gets 'Ticks' away " +
|
||||
"from the opposite inside market, it is re-priced to cross the opposite inside market by 'Cross Ticks.'");
|
||||
|
||||
public static ParameterSection TimeBasedCross =>
|
||||
new ParameterSection("Time Based Cross", true,
|
||||
"forces legged hedge orders to automatically cross the market, if they are still " +
|
||||
"Forces legged hedge orders to automatically cross the market, if they are still " +
|
||||
"working beyond a certain time period.If a hedge order is legged for 'Time(ms)', " +
|
||||
"it is re-priced to cross the opposite inside market by 'Cross Ticks.'");
|
||||
|
||||
public static ParameterSection OppositeMarketVolumeBasedCross =>
|
||||
new ParameterSection("Size Based Cross", true,
|
||||
"forces legged hedging orders to automatically cross the market if the volume " +
|
||||
"Forces legged hedging orders to automatically cross the market if the volume " +
|
||||
"of the opposite inside market drops below the threhold. If opposite inside market volume drops below 'Threshold,' " +
|
||||
"it is re-priced to cross the opposite inside market by 'Cross Ticks.'");
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace mbts.spark {
|
||||
partial class SyntheticEditorVM {
|
||||
public interface IParameterRowVM {
|
||||
string display_name { get; }
|
||||
string help_text { get; }
|
||||
bool read_only { get; }
|
||||
ParameterSection[] section_path { get; }
|
||||
}
|
||||
@@ -23,6 +24,7 @@ namespace mbts.spark {
|
||||
|
||||
public RowVM(IRowModel model, ObservableCollection<LegSpreaderParamsTuple> legs) {
|
||||
display_name = model.display_name;
|
||||
help_text = model.help_text;
|
||||
section_path = model.section_path;
|
||||
for (int i = 0; i < section_count; i++)
|
||||
section_path[i].level = i;
|
||||
@@ -35,6 +37,7 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
public string display_name { get; }
|
||||
public string help_text { get; }
|
||||
public FontWeight font_weight { get; }
|
||||
public ParameterSection[] section_path { get; }
|
||||
public int section_count => section_path.Length;
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace bts.shell {
|
||||
SparkCommands.ShowAboutSpark,
|
||||
// SparkCommands.ShowReleaaseNotes,
|
||||
SparkCommands.ShowActivityLog,
|
||||
SparkCommands.ShowManual,
|
||||
};
|
||||
|
||||
public Task<IShellWindow> create(Stream load_stream) {
|
||||
|
||||
@@ -74,9 +74,9 @@ namespace bts.spark
|
||||
|
||||
// Support
|
||||
public static SparkCommand ShowManual =>
|
||||
SparkCommand.create("Manual", Icons.Book, SparkTags.ShowUri, new Uri("bts://m/"));
|
||||
SparkCommand.create("Manual", Icons.Browser, SparkTags.ShowUri, new Uri("https://www.bluetradingsystems.com/documentation/"));
|
||||
|
||||
public static SparkCommand ShowReleaseNotes =>
|
||||
public static SparkCommand ShowReleaseNotes =>
|
||||
SparkCommand.create("Release Notes", Icons.Browser, SparkTags.ShowUri, new Uri("bts://files/release_notes.txt"));
|
||||
|
||||
public static SparkCommand DoNothing =>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ResourceDictionary
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mbts="clr-namespace:mbts.ui"
|
||||
@@ -59,7 +59,7 @@
|
||||
<Border Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderThickness="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="5">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
@@ -70,7 +70,7 @@
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="{mbts:BTSColor UI.Button.pressed_background}" />
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="{mbts:BTSColor UI.Button.pressed_background}" />
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="{mbts:BTSColor UI.Button.pressed_background}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -89,7 +89,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SparkMenuItem">
|
||||
|
||||
|
||||
<Border Name="launcher_button_border"
|
||||
BorderThickness="0"
|
||||
MinWidth="150"
|
||||
@@ -108,7 +108,7 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Canvas>
|
||||
<Polygon
|
||||
<Polygon
|
||||
Name="menu_item_animated_arrow"
|
||||
Points="0,0 290,0 300,22.5 290,45 0,45 10,22.5"
|
||||
Margin="-300 0 0 0"
|
||||
@@ -116,7 +116,7 @@
|
||||
Fill="{DynamicResource StartMenuMouseOverBackground}"
|
||||
/>
|
||||
</Canvas>
|
||||
<Polygon
|
||||
<Polygon
|
||||
Name="menu_item_arrow"
|
||||
Grid.Column="0"
|
||||
Points="0,0 10,22.5 0,45"
|
||||
@@ -396,6 +396,11 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||
<Grid.ToolTip>
|
||||
<ToolTip MaxWidth="300">
|
||||
<TextBlock Text="{TemplateBinding ToolTip}" TextWrapping="Wrap" />
|
||||
</ToolTip>
|
||||
</Grid.ToolTip>
|
||||
<Ellipse HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="{TemplateBinding Background}" Opacity="0" x:Name="_el" />
|
||||
<TextBlock Text="?" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
@@ -472,16 +477,16 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border
|
||||
<Border
|
||||
x:Name="Border"
|
||||
CornerRadius="0"
|
||||
CornerRadius="0"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Height="Auto"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
RecognizesAccessKey="True"
|
||||
@@ -608,11 +613,11 @@
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Border x:Name="background"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
<Border x:Name="background"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="8"
|
||||
Background="{TemplateBinding Background}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Width="54" Height="18">
|
||||
<Canvas>
|
||||
<Ellipse x:Name="lever" VerticalAlignment="Center" Width="9" Height="9" Fill="Black" Canvas.Top="3" Canvas.Left="3" />
|
||||
|
||||
Reference in new issue
Block a user