public void TestInitialize()
        {
            dataBarsForTesting = new DataBarsForTesting();
            bars = dataBarsForTesting.GetBars();
            pivotPointsIndicator = new PivotPointsIndicator();

            IReadOnlyList <IDataBar> barsBase = new ReadOnlyList <IDataBar>();
            var barsBaseAccessAdding          = (ReadOnlyList <IDataBar>)barsBase;

            IDataBar bar;

            foreach (var b in bars)
            {
                bar = new DataBarFake()
                {
                    Open = b.Open, High = b.High, Low = b.Low, Close = b.Close
                };
                barsBaseAccessAdding.Add(bar);
            }
            ISecurity securityBase             = new SecurityISecurityFake();
            var       securityBaseAccessAdding = (SecurityISecurityFake)securityBase;

            securityBaseAccessAdding.Bars = barsBaseAccessAdding;

            security      = new SecurityTSlab(securityBase);
            lastBarNumber = security.GetBarsCount() - 1;
        }
        public void TestInitialize()
        {
            IReadOnlyList <IDataBar> barsBase = new ReadOnlyList <IDataBar>();
            var barsBaseAccessAdding          = (ReadOnlyList <IDataBar>)barsBase;

            IDataBar bar;

            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 5, 0)
            };
            barsBaseAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 10, 0)
            };
            barsBaseAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 15, 0)
            };
            barsBaseAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 20, 0)
            };
            barsBaseAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 25, 0)
            };
            barsBaseAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 30, 0)
            };
            barsBaseAccessAdding.Add(bar);

            ISecurity securityBase             = new SecurityISecurityFake();
            var       securityBaseAccessAdding = (SecurityISecurityFake)securityBase;

            securityBaseAccessAdding.Bars = barsBaseAccessAdding;

            IReadOnlyList <IDataBar> barsCompressed = new ReadOnlyList <IDataBar>();
            var barsCompressedAccessAdding          = (ReadOnlyList <IDataBar>)barsCompressed;

            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 5, 0)
            };
            barsCompressedAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 15, 0)
            };
            barsCompressedAccessAdding.Add(bar);
            bar = new DataBarFake()
            {
                Date = new DateTime(2021, 6, 18, 14, 30, 0)
            };
            barsCompressedAccessAdding.Add(bar);

            ISecurity securityCompressed             = new SecurityISecurityFake();
            var       securityCompressedAccessAdding = (SecurityISecurityFake)securityCompressed;

            securityCompressedAccessAdding.Bars = barsCompressedAccessAdding;

            security = new SecurityTSlab(securityCompressed, securityBase);
        }