Click or drag to resize

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.

GUI IndexSecurityWindow

Basic properties

To use IndexEditor, first you need to register a special service:

C#
...
ConfigManager.RegisterService<ICompilerService>(new RoslynCompilerService());
...

Next, the securities necessary for index calculating should be passed to IndexEditor:

C#
...
IndexEditor.Securities.AddRange(SecurityProvider.LookupAll());
SecurityProvider.Added += OnAdded;
...
private void OnAdded(IEnumerable<Security> securities)
     {
         IndexEditor.Securities.AddRange(securities);
     }