You would create an instance of WildersSmoothingQueue which takes a period parameter.
For each value, you would call AddValue() with your current price. It will perform the calculation and you can get the current value by using the Value property.
The difference here is that you're going to be adding a value at a time to the queue instead of passing in the whole list and referencing by index.
WildersSmoothingQueue queue = new WildersSmoothingQueue(14);
public void NewBar()
// Get latest calculation
double x = queue.Value;
With the old way, we'd have to perform a full recalculation each time you called WildersSmoothingValue();
Ok, so how would I get the equivalent of:
double x = IndicatorMath.WildersSmoothingValue(aList, aList.Count - 1, Period);
thx in advance