FastQuant.MetaStrategy.Add C# (CSharp) Méthode

Add() public méthode

public Add ( Strategy strategy ) : void
strategy Strategy
Résultat void
        public void Add(Strategy strategy)
        {
            this.list_1.Add(strategy);
            strategy.Portfolio.Parent = Portfolio;
            foreach (Instrument current in strategy.Instruments)
            {
                List<Strategy> list;
                if (this.idArray_3[current.Id] == null)
                {
                    list = new List<Strategy>();
                    this.idArray_3[current.Id] = list;
                }
                else
                {
                    list = this.idArray_3[current.Id];
                }
                list.Add(strategy);
                if (!Instruments.Contains(current))
                {
                    Instruments.Add(current);
                }
            }
        }