Code not working since update : "!= double.NaN"
Code not working since update : "!= double.NaN"
29 Jul 2022, 12:33
Hi,
Since updating since yesterday. Code that was working fine is no longer, and i'm not sure why. Its so basic.
If i remove this snippet , indicator works. Any ideas ?
if (AUD[index] == double.NaN)
{
AUD[index] = 0;
IndicatorArea.DrawText("Text1", "AUD: " + index, index , 0, audColor);
}
else if (AUD[index] != double.NaN)
{
IndicatorArea.DrawText("Text1", "AUD: " + index, index , AUD[index], audColor);
}
Keep getting the following error.
"Crashed in Calculate with ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: y. Actual value was: NaN."
Thanks in advance
Replies
userUser
02 Aug 2022, 18:00
RE:
K100 said:
Hi,
Since updating since yesterday. Code that was working fine is no longer, and i'm not sure why. Its so basic.
If i remove this snippet , indicator works. Any ideas ?
if (AUD[index] == double.NaN)
{
AUD[index] = 0;
IndicatorArea.DrawText("Text1", "AUD: " + index, index , 0, audColor);
}
else if (AUD[index] != double.NaN)
{
IndicatorArea.DrawText("Text1", "AUD: " + index, index , AUD[index], audColor);
}
Keep getting the following error.
"Crashed in Calculate with ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: y. Actual value was: NaN."
Thanks in advance
Try double.IsNaN(AUD[index]) == true or false
@userUser
K100
29 Jul 2022, 13:27
RE:
Nevermind. Found an alternate solution
K100 said:
@K100