Esempio n. 1
0
 /// <summary>
 ///     Concatenates <paramref name="updatables"/> whenever <paramref name="crunchTriggers"/> is updated for n <paramref name="interval"/> times.
 /// </summary>
 /// <param name="name">Name of the cruncher for debugging purposes.</param>
 /// <param name="crunchTriggers">The <see cref="IUpdatable"/>s to observe for fires of <see cref="IUpdatable.Updated"/>.</param>
 /// <param name="interval">The interval for how many fires must <paramref name="crunchTriggers"/> trigger <see cref="IUpdatable.Updated"/> in order to trigger IndicatorRow's update event.</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>
 /// <param name="indices">The index to use to call <paramref name="factory"/>.</param>
 /// <param name="factory">A factory to initialize new indicators using <paramref name="indices"/>.</param>
 /// <param name="triggerMustBeReady">Does <paramref name="crunchTriggers"/> must be ready to trigger IndicatorRow's update event? By default </param>
 /// <returns>A new cruncher configured.</returns>
 public static Concat OnSpecificUpdate(IEnumerable <int> indices, IndicatorFactoryHandler factory, IUpdatable[] crunchTriggers, int interval = 1, int properties = 1, string name = null, bool[] triggerMustBeReady = null)
 {
     return(BindToConcatenatingList(Concat.OnSpecificUpdate(Factory(indices, factory), crunchTriggers, interval, properties, name, triggerMustBeReady)));
 }
Esempio n. 2
0
 /// <summary>
 ///     Concatenates <paramref name="updatables"/> whenever <paramref name="crunchTriggers"/> is updated for n <paramref name="interval"/> times.
 /// </summary>
 /// <param name="name">Name of the cruncher for debugging purposes.</param>
 /// <param name="crunchTriggers">The <see cref="IUpdatable"/>s to observe for fires of <see cref="IUpdatable.Updated"/>.</param>
 /// <param name="interval">The interval for how many fires must <paramref name="crunchTriggers"/> trigger <see cref="IUpdatable.Updated"/> in order to trigger IndicatorRow's update event.</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>
 /// <param name="size">How many indicators will be initialized via <paramref name="factory"/>.</param>
 /// <param name="factory">A factory to initialize new indicators.</param>
 /// <param name="triggerMustBeReady">Does <paramref name="crunchTriggers"/> must be ready to trigger IndicatorRow's update event? By default </param>
 /// <returns>A new cruncher configured.</returns>
 public static Concat OnSpecificUpdate(IUpdatable source, BindingIndicatorFactoryHandler factory, IUpdatable[] crunchTriggers, int interval = 1, int properties = 1, string name = null, bool[] triggerMustBeReady = null, bool waitForSourceReady = true)
 {
     IUpdatable[] sources = Factory(source, factory);
     return(BindToConcatenatingList(source, Concat.OnSpecificUpdate(sources, crunchTriggers, interval, properties, name, triggerMustBeReady)));
 }
Esempio n. 3
0
 /// <summary>
 ///     Concatenates <paramref name="updatables"/> whenever <paramref name="crunchTrigger"/> is updated for n <paramref name="interval"/> times.
 /// </summary>
 /// <param name="name">Name of the cruncher for debugging purposes.</param>
 /// <param name="crunchTrigger">The <see cref="IUpdatable"/> to observe for fires of <see cref="IUpdatable.Updated"/>.</param>
 /// <param name="interval">The interval for how many fires must <paramref name="crunchTrigger"/> trigger <see cref="IUpdatable.Updated"/> in order to trigger IndicatorRow's update event.</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>
 /// <param name="size">How many indicators will be initialized via <paramref name="factory"/>.</param>
 /// <param name="factory">A factory to initialize new indicators.</param>
 /// <param name="triggerMustBeReady">Does <paramref name="crunchTrigger"/> must be ready to trigger IndicatorRow's update event?</param>
 /// <returns>A new cruncher configured.</returns>
 public static Concat OnSpecificUpdate(int size, IndicatorFactoryHandler factory, IUpdatable crunchTrigger, int interval = 1, int properties = 1, string name = null, bool triggerMustBeReady = true)
 {
     return(BindToConcatenatingList(Concat.OnSpecificUpdate(Factory(size, factory), crunchTrigger, interval, properties, name, triggerMustBeReady)));
 }