Index |
IndexEditor - Graphic control for editing ExpressionIndexSecurity.
ExpressionIndexSecurity - is a special type of index security based on a combination of several securities using mathematical formulas. This type has the Expression, property, which stores the formula in text form and the list of underlying InnerSecurityIds securities.
Basic properties
Securities - all available securities.
Formula - mathematical formula of the index.
To use IndexEditor, first you need to register a special service:
...
ConfigManager.RegisterService<ICompilerService>(new RoslynCompilerService());
...
Next, the securities necessary for index calculating should be passed to IndexEditor:
... IndexEditor.Securities.AddRange(SecurityProvider.LookupAll()); SecurityProvider.Added += OnAdded; ... private void OnAdded(IEnumerable<Security> securities) { IndexEditor.Securities.AddRange(securities); }