Math.Min & DataSeries
Author: akardar1
Creation Date: 2/18/2017 11:11 AM
profile picture

akardar1

#1
Hi,

I am not able to get this following line to work, is there a reason why this line of code does not compile ?

CODE:
Please log in to see this code.



AK
profile picture

Eugene

#2
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.
profile picture

akardar1

#3
Of course, thank you
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).