public void kekek() { ExponentialMovingAverage Selector(int i) => new ExponentialMovingAverage($"EMA{i + 2}", i + 2); var concat = Concat.OnAllUpdatedOnce(Enumerable.Range(0, 3).Select(Selector)); Concat.ForEvery.OnAllUpdatedOnce(concat, Selector); }
/// <summary> /// Concatenates when all <see cref="IUpdatable"/> were updated atleast once. /// </summary> /// <param name="name">Name of the cruncher for debugging purposes.</param> /// <param name="properties"> /// How many properties all of the <paramref name="updatables"/> emit. /// this can be less than their minimal properties. /// e.g. if <paramref name="updatables"/> emit <see cref="BarValue"/> (4 properties), selecting 1 will take only <see cref="BarValue.Close"/>. /// </param> /// <returns>A new cruncher configured.</returns> public static Concat OnAllUpdatedOnce(IUpdatable source, BindingIndicatorFactoryHandler factory, int properties = 1, string name = null, bool waitForSourceReady = true) { IUpdatable[] sources = Factory(source, factory); return(BindToConcatenatingList(source, Concat.OnAllUpdatedOnce(sources, properties, name))); }
/// <summary> /// Concatenates when all <see cref="IUpdatable"/> were updated atleast once. /// </summary> /// <param name="name">Name of the cruncher for debugging purposes.</param> /// <param name="properties"> /// How many properties all of the <paramref name="updatables"/> emit. /// this can be less than their minimal properties. /// e.g. if <paramref name="updatables"/> emit <see cref="BarValue"/> (4 properties), selecting 1 will take only <see cref="BarValue.Close"/>. /// </param> /// <returns>A new cruncher configured.</returns> public static Concat OnAllUpdatedOnce(int size, IndicatorFactoryHandler factory, int properties = 1, string name = null) { return(BindToConcatenatingList(Concat.OnAllUpdatedOnce(Factory(size, factory), properties, name))); }