add enable_hedging property to LegSpreaderParams
This commit is contained in:
1 parent
f171adb2ab
commit
c2f470ea9d
3 files changed
+14
-4
No files matched your search
@@ -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<LegSpreaderParamsTuple> leg_tups) { return !leg_tups.Any(lt => lt.leg_params.IsActiveQuoting); }
|
||||
}
|
||||
|
||||
internal class EnableHedgingModel : RowModelBase<bool> {
|
||||
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<LegSpreaderParamsTuple> leg_tups) { return !leg_tups.Any(lt => lt.leg_params.EnableHedging); }
|
||||
}
|
||||
|
||||
#region Quote
|
||||
internal class LeanRatioModel : RowModelBase<double> {
|
||||
public override string display_name { get; } = "Lean Ratio";
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace mbts.spark
|
||||
new SizeModel(synthetic.Id != 0),
|
||||
new PriceMultiplierModel(),
|
||||
new IsQuoteModel(),
|
||||
new EnableHedgingModel(),
|
||||
//new MaxOrderMoveModel(),
|
||||
new QuoteMuteZoneInsideTicksModel(),
|
||||
new QuoteMuteZoneOutsideTicksModel(),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*************************************************************************************************
|
||||
|
||||
Reference in new issue
Block a user