diff --git a/src/client/spark/mspark/Shell/Securities/Synthetic/VM/RowModel.cs b/src/client/spark/mspark/Shell/Securities/Synthetic/VM/RowModel.cs index 28d9479bf..d202e4e26 100644 --- a/src/client/spark/mspark/Shell/Securities/Synthetic/VM/RowModel.cs +++ b/src/client/spark/mspark/Shell/Securities/Synthetic/VM/RowModel.cs @@ -87,10 +87,18 @@ namespace mbts.spark public override bool get_value(LegSpreaderParamsTuple leg_tup) { return leg_tup.leg_params.IsActiveQuoting; } public override void set_value(LegSpreaderParamsTuple leg_tup, bool value) { leg_tup.leg_params.IsActiveQuoting = value; } public override string display_name { get; } = "Is Active Quote"; - public override string[] section_path { get; } = new[] { SectionNames.Quote }; + public override string[] section_path { get; } = new[] { SectionNames.LegDef }; public override bool has_errors(IReadOnlyCollection leg_tups) { return !leg_tups.Any(lt => lt.leg_params.IsActiveQuoting); } } + internal class EnableHedgingModel : RowModelBase { + public override bool get_value(LegSpreaderParamsTuple leg_tup) { return leg_tup.leg_params.EnableHedging; } + public override void set_value(LegSpreaderParamsTuple leg_tup, bool value) { leg_tup.leg_params.EnableHedging = value; } + public override string display_name { get; } = "Enable Hedging"; + public override string[] section_path { get; } = new[] { SectionNames.LegDef }; + public override bool has_errors(IReadOnlyCollection leg_tups) { return !leg_tups.Any(lt => lt.leg_params.EnableHedging); } + } + #region Quote internal class LeanRatioModel : RowModelBase { public override string display_name { get; } = "Lean Ratio"; diff --git a/src/client/spark/mspark/Shell/Securities/Synthetic/VM/SyntheticEditorVM.cs b/src/client/spark/mspark/Shell/Securities/Synthetic/VM/SyntheticEditorVM.cs index 0de8549e4..294bfaf1d 100644 --- a/src/client/spark/mspark/Shell/Securities/Synthetic/VM/SyntheticEditorVM.cs +++ b/src/client/spark/mspark/Shell/Securities/Synthetic/VM/SyntheticEditorVM.cs @@ -28,6 +28,7 @@ namespace mbts.spark new SizeModel(synthetic.Id != 0), new PriceMultiplierModel(), new IsQuoteModel(), + new EnableHedgingModel(), //new MaxOrderMoveModel(), new QuoteMuteZoneInsideTicksModel(), new QuoteMuteZoneOutsideTicksModel(), diff --git a/src/lib/sparkproto/SparkProtos.proto b/src/lib/sparkproto/SparkProtos.proto index 842d3a041..e5ac28966 100644 --- a/src/lib/sparkproto/SparkProtos.proto +++ b/src/lib/sparkproto/SparkProtos.proto @@ -378,9 +378,10 @@ message LegSpreaderParams /// Legs can be quoted actively, or sent in reponse /// to fills bool is_active_quoting = 20; - QuoteParams quote_params = 30; - PreHedgeParams pre_hedge_params = 40; - PostHedgeParams post_hedge_params = 50; + bool enable_hedging = 30; + QuoteParams quote_params = 40; + PreHedgeParams pre_hedge_params = 50; + PostHedgeParams post_hedge_params = 60; } /*************************************************************************************************