NaN or Number

Created at 13 Nov 2013, 20:58
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
OL

Old Account

Joined 14.10.2013

NaN or Number
13 Nov 2013, 20:58


Hi, i was wondering how i can tell my robot not to place an order if a value isn't a number

So basically i need to tell it it's NaN or a number.

 


@Old Account
Replies

Kate
13 Nov 2013, 22:02

I haven't really understood what you mean. But may be you want something something like this:

if (double.IsNaN(myNumber))
   ...
else
   ...

 


@Kate

Old Account
13 Nov 2013, 23:31

Sorry for being so unclear in my explanation of the problem, but you suggestion worked.

Thanks!


@Old Account