16 using Newtonsoft.Json;
17 using Newtonsoft.Json.Linq;
20 using Newtonsoft.Json.Converters;
21 using Newtonsoft.Json.Serialization;
34 [JsonConverter(typeof(StringEnumConverter))]
61 public bool IsMet(
string jsonBacktestResult)
63 if (
string.IsNullOrEmpty(jsonBacktestResult))
65 throw new ArgumentNullException(nameof(jsonBacktestResult), $
"Constraint.IsMet(): {Messages.OptimizerObjectivesCommon.NullOrEmptyBacktestResult}");
68 var token = Objectives.Target.GetTokenInJsonBacktest(jsonBacktestResult,
Target);
75 token.Value<
string>().ToNormalizedDecimal(),
84 return $
"{Target} '{Operator}' {TargetValue.Value}";