I have a problem in one of my strategies in which the code below will always return the Stochastics value as 66.666667.
Looks suspicious that it is 2/3 and it doesn't ever change. Seems to not be a cached Indicator value as when I debug I can see that the Cache value isn't pulled.
I tried the override with (Input, 7, 14, 3) and (BarsArray[0],7,14,3) but the former has the same issue and the latter returns 0.
private bool IsStochasticInMidRange(double thresholdDistFromTopAndBtm) {[INDENT]//TODO: BROKEN - ALWAYS RETURNS 67 [B]double stoch = Stochastics(7, 14, 3).K[0];[/B] bool isMidRange = stoch < (100 - thresholdDistFromTopAndBtm) && stoch > thresholdDistFromTopAndBtm; return isMidRange;[/INDENT] }
Cheers
Frank
Comment