BardParticipant
Master
Hi
I wanted to add a second condition to a system buy condition and it gave me a warning (pls see screenshot). Any ideas why? (The Oscillator is bounded between -1 and +1)
Thanks.
The original code was:
if (stdev[0]+stdev[1]+stdev[2]+stdev[3]+stdev[4]) < (stdev[1]+stdev[2]+stdev[3]+stdev[4]+stdev[5]) then
SWBUY=1
else
SWBUY=0
ENDIF
And then I wanted to add a filter (the oscillator):
c1 = CALL "Ehler's Univ Osc SuperSmoother"
which was placed at the top of the system code and the Oscillator added to a Std Dev condition:
if (stdev[0]+stdev[1]+stdev[2]+stdev[3]+stdev[4]) < (stdev[1]+stdev[2]+stdev[3]+stdev[4]+stdev[5]) AND
c1 >= 0.0 then
SWBUY=1
else
SWBUY=0
ENDIF
Hi,
I don’t know the Ehler’s univ osc supersmoother, but I am going to guess its “return” line contains 2 variables? If the answer is yes, then if you want the first one of these 2, try with:
c1,ignored = CALL "Ehler's Univ Osc SuperSmoother"
or if you want the second one rather than the first:
ignored,c1 = CALL "Ehler's Univ Osc SuperSmoother"
BardParticipant
Master
Thanks very much Noobywan, example #1 above has fixed it because it was returning the actual signal line value plus the zero line value (the latter needing to be ignored). It is normally written, when created by simple programming, as:
// Conditions to enter long positions
indicator1, ignored = CALL "Ehler's Univ Osc SuperSmoother"
c1 = (indicator1 CROSSES OVER -0.8)