All’s well that ends well! 🙂
All’s well that ends well!
Maybe not … @maximus78 may have used Roberto code (thinking it was correct / what he needed) and has blown his account … never to be seen again!
Only teasing! 🙂
Yes, but he can refund it and win this time! 🙂
I know reviving old topics may be dangerous, but keeping an error running is more dangerous!
Hello guys, I remember I have verified the code line of Roberto and it was right.
Now I have verified again in this way and as you can see the results are exactly the same.
I did an indicator called Maximus with the code of my request:
a=close>close[1] and close>close[2] and close>close[3] and close>close[4] and close>close[5]
if a then
result=1
else
result=0
endif
return result
Then i did another indicator called Roberto with his code:
IF close > highest[5](close[1]) THEN
result=1
else
result=0
endif
return result
Comparing the results of the binary indicators you see they gives the same results.
Max
…and the final test. All three in one indicator and output compared. They all do the same thing.
//maximus
a=close>close[1] and close>close[2] and close>close[3] and close>close[4] and close>close[5]
if a then
result=1
else
result=0
endif
//roberto
IF close > highest[5](close[1]) THEN
result2=1
else
result2=0
endif
//vonasi
x = 5
count = 0
for i = 1 to x
if close > close[i] then
count = count + 1
endif
next
result3 = 0
if count = x then
result3 = 1
endif
//final check
result4 = result + result2 + result3
flag = 0
if result4 <> 0 and result4 <> 3 then
flag = 1
endif
return flag
HAHAHAHA … and all that sleep you lost / nightmares Vonasi! 🙂
Just shows … more than one way to splice the mainbrace eh!
more than one way to splice the mainbrace eh!
…or more than one way to skin a cat….. or more than one way to trip over it in Roberto’s case! 🙂
Yes, the first 3 snippets yield the same results, but not my 4th one (summation).
So this one is the incorrect one.
but not my 4th one (summation).
Thank God one of us has finally confirmed that we were wrong – even if it was only 50% wrong! 🙂