Unit CorrelationSymbols; Interface Uses Classes; { This is just a simple place to store things. The actual processing is done elsewhere. } Procedure AddCorrelationSymbol(Symbol : String); Procedure AddCorrelationSymbols(Symbols : TStrings); Function IsCorrelationSymbol(Symbol : String) : Boolean; Function GetFuturesCorrelationSymbol : String; Procedure SetFuturesCorrelationSymbol(Const Value : String); Implementation Var AllCorrelationSymbols : TStringList; Procedure AddCorrelationSymbol(Symbol : String); Begin AllCorrelationSymbols.Add(Symbol) End; Procedure AddCorrelationSymbols(Symbols : TStrings); Var I : Integer; Begin For I := 0 To Pred(Symbols.Count) Do AddCorrelationSymbol(Symbols[I]) End; Function IsCorrelationSymbol(Symbol : String) : Boolean; Var Unused : Integer; Begin Result := AllCorrelationSymbols.Find(Symbol, Unused) End; Var FuturesCorrelationSymbol : String = 'QQQQ'; // The default. Function GetFuturesCorrelationSymbol : String; Begin // Internally, this code, the realtime code, the database, and the csv // files all call this the "futures correlation." That name is a bit out // of date. The alerts were renamed "market divergence" a long time ago. Result := FuturesCorrelationSymbol End; Procedure SetFuturesCorrelationSymbol(Const Value : String); Begin FuturesCorrelationSymbol := Value End; Initialization AllCorrelationSymbols := TStringList.Create; AllCorrelationSymbols.Sorted := True; AllCorrelationSymbols.Duplicates := dupIgnore; End.