PartialValue
Author: avishn
Creation Date: 5/28/2010 8:29 AM
profile picture

avishn

#1
Two questions on indicators with partial value --

Is this a correct way of using them in a strategy?
CODE:
Please log in to see this code.

... i.e., do I really need an explicit call to CalcualtePartialValue() or some magic behind the scenes does it/could do it for me? It is a virtual method, so I was wondering if there's a call to it somewhere from within WLP strategy management.

Second question/suggestion --
CODE:
Please log in to see this code.

... this "==Double.NaN" is everywhere in TASCIndicators' CalculatePartialValue(). It is my understanding that it will always evaluate to false (NaN is never equals another NaN per C# spec). I think you need to have Double.IsNaN(value) instead.




profile picture

Eugene

#2
QUOTE:
I think you need to have Double.IsNaN(value) instead.

Good catch, that's right. Thanks.
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).