Hi,
The reason is that one can't just pass unsupported arguments to functions that do not expect it. The code does it twice, trying to pass a
DataSeries to .NET's Math.Min that doesn't know a thing about it, and the
double value (that Math.Min is expected to return) to SMA that expects a DataSeries.
Here's how you can code it using a loop:
CODE:
Please log in to see this code.