
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
.
Hi WHRoeder,
I've already converted it to an 1D version.
But this TheilSen function still's confuse me...
In the linear regression slope function we have a value return but the TheilSen function does not have any return.
I'm not used to use functions like that, but I presume that the objective of that function is to calculate all the loops in order to get the "m" and "b" values.
If so... Why does the function call have the parameters "m" and "b"?!? If that is what we want to get?!?
TheilSen(m, b, ...
Sory about this (probably) stupid questions but I realy dont understand the meaning of the "m" and "b" in the function call... :(
.
.
Yes.. That I understand..
What confuse me is why does we need to call that function with those parameters?!
What I want to say is this:
.
Why is the funtion call like this:
TheilSen(m, b, Close, RegLin_Period, iBar);
And not like this:
TheilSen(Close, RegLin_Period, iBar);
.
What are "m" and "b" doing there?!?!
.
Once again, sorry about this noobie questions and thank you for your patience!
.
What are "m" and "b" doing there?!?!
.
Sorry guys... I'm not explaing myself...
I understand what does "m" and "b" mean.
I belive that I understand the way the function works.
I think that when it runs the "m" and "b" values are calculated.
What I don't understand is why are "m" and "b" in the function parameters.
.
For example in this simple function...
"a", "b" and "c" are parameters that will be used in the function calculation.
In the TheilSen function "m" and "b" are the first two parameters but I don´t see where they are used!
Simplifying... I'm reading that function like this:
i.e. when we call that function we are given unecessary "m" and "b" paramenters
.
strutch: i.e. when we call that function we are given unnecessary "m" and "b" parameters
In your example(), m and b are unnecessary. In my function m and b are passed by reference and return values.
Perfect... Now I understood!!! :)
Sorry about this but I didn't know about the "&" importance.
.
Meahnwhile, i'm trying (attached file) to follow your advices but it doesn't work... :(
.
Perfect... Now I understood!!! :)
Sorry about this but I didn't know about the "&" importance.
Perfect... Now I understood!!! :)
Sorry about this but I didn't know about the "&" importance.
.
Meahnwhile, i'm trying (attached file) to follow your advices but it doesn't work... :(
.
well it can't work as your statíc double slopes[] has a length of zero:
this helps: