Ejemplo n.º 1
0
 public void HasSymbol(ValidationContext ctx)
 {
     foreach (var sym in Template.Symbols)
     {
         if (!Feed.SymbolsAvailable.Contains(sym))
         {
             ctx.AddIssue($"Account does not provide symbol '{sym}'");
         }
     }
 }
Ejemplo n.º 2
0
 public ValidationContext ValidateCreate(ValidationContext context)
 {
     context.MemberNonNull(Feed, nameof(Feed));
     if (TimeFrame == "t1")
     {
         context.AddIssue(new ValidationIssue
         {
             Message      = "t1 not supported for TMarketSeries.  Use TMarketTickSeries instead.",
             VariableName = nameof(TimeFrame),
             Kind         = ValidationIssueKind.InvalidConfiguration | ValidationIssueKind.ParameterOutOfRange,
         });
     }
     return(context);
 }