public FractalUp(DataSeries ds, string description) : base(ds, description) { DataSeries fracUpBar = FractalUpBar.Series(ds); for (int n = 0; n < ds.Count; n++) { if (fracUpBar[n] > 0) { base.FirstValidValue = n; break; } } for (int bar = base.FirstValidValue; bar < ds.Count; bar++) { int fb = (int)fracUpBar[bar]; this[bar] = ds[fb]; } }
public static double Value(int bar, DataSeries ds) { DataSeries fracUpBar = FractalUpBar.Series(ds); int fb = (int)fracUpBar[bar]; return ds[fb]; }