Problem Using ‘Recent’ Function.
4 replies
RJL
11 years ago #114280
I have a custom indicator which, when using a direct and normal ‘IF’ condition works fine, but when I try to apply it to the ‘recent’ function (so it looks back x amount of bars to see if the condition was previously met) it doesn’t want to work at all no matter how many or how few bars I allow it to look back.
It’s definitely nothing to do with the ‘IF’ condition itself, only when using it with the ‘recent’ function.
Whether this is to be expected or not, I noticed in the source code that when you use the ‘recent’ function, it doesn’t come up using the same code snippet it would use if using the condition without the ‘recent’ function. It comes up with something like this:
==========
&& (sqGetRecent( -1204205979 , 5, signalShift) == sqGetRecent( -1884264349 , 5, signalShift)))))))
==========
That random number then comes up later in the code which has all the indicator settings…
==========
0
Tomas Matejka
11 years ago #133256
Hi, will check that in Wizard
0
RJL
11 years ago #133271
Thank you, Tomas.
0
RJL
11 years ago #133316
Hi, will check that in Wizard
Any news Tomas?
0
Mark Fric
11 years ago #133346
I looked at it, but I don’t see any obvious error there.
Using Recent is different that calling indicator directly, because it has to check for indicator value in cycle of given last few bars, getHighest, getLowest functions work in the same way.
It works as you described it – EA Wizard generates random number that is then used to identify which indicator should be called in the getRecent() function.
It should work properly.
How does your getRecent() function look like?
Maybe log the values that are returned by the Recent function – you’ll see then why the conditions aren’t valid.
Mark
StrategyQuant architect
0
Viewing 4 replies - 1 through 4 (of 4 total)