Esempio n. 1
0
        public static FractalDownBar Series(DataSeries ds)
        {
            string description = "FractalDownBar(" + ds.Description + ")";

            if (ds.Cache.ContainsKey(description))
            {
                return (FractalDownBar)ds.Cache[description];
            }

            FractalDownBar FractalDownBar = new FractalDownBar(ds, description);
            ds.Cache[description] = FractalDownBar;
            return FractalDownBar;
        }
Esempio n. 2
0
        public FractalDown(DataSeries ds, string description)
            : base(ds, description)
        {
            DataSeries fracDnBar = FractalDownBar.Series(ds);

            for (int n = 0; n < ds.Count; n++)
            {
                if (fracDnBar[n] > 0)
                {
                    base.FirstValidValue = n;
                    break;
                }
            }

            for (int bar = base.FirstValidValue; bar < ds.Count; bar++)
            {
                int fb = (int)fracDnBar[bar];
                this[bar] = ds[fb];
            }
        }
Esempio n. 3
0
 public static double Value(int bar, DataSeries ds)
 {
     DataSeries fracDnBar = FractalDownBar.Series(ds);
     int fb = (int)fracDnBar[bar];
     return ds[fb];
 }