From efdb4d4c65d9ce3787f8a568af31b265f1712b15 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 13 Feb 2025 15:05:06 -0500 Subject: [PATCH] HedgeTest --- Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index fadc806..80b4e2d 100644 --- a/Program.cs +++ b/Program.cs @@ -875,7 +875,11 @@ namespace MarketData } else if(hedgeManager.IsLowerBandBreakIndicator(analysisDate, position)) { - MarketData.Generator.Model.StopLimit stopLimit = hedgeManager.EvaluateStopPriceHedge(analysisDate, position, hedgeStopLimitScalingVolatilityDays, hedgeMinDaysBetweenStopAdjustments); + MGSHConfiguration msghConfiguration = new MGSHConfiguration(); + msghConfiguration.HedgeMinDaysBetweenStopAdjustments=hedgeMinDaysBetweenStopAdjustments; + msghConfiguration.StopLimitScalingVolatilityDays=hedgeStopLimitScalingVolatilityDays; + msghConfiguration.HedgeATRMultiplier=1.00; // Check this value against what is being used in the actual config. It controls how closely the stop limit trails + MarketData.Generator.Model.StopLimit stopLimit = hedgeManager.EvaluateStopPriceHedge(analysisDate, position, msghConfiguration); if(null != stopLimit)StopLimits.Add(stopLimit); } }