
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
My thought is:
( Before below zero ) & ( Present above zero ) => There was a zero cross!
( Before above zero ) & ( Present below zero ) => There was a zero cross!
.
Maybe the problem is elsewhere.. Here is the complete code I'm using to get those Distances:
.
Maybe the problem is elsewhere.. Here is the complete code I'm using to get those Distances:
What about the condition where the values match on the present bar (index bar) ?
I'm pretty sure you're right about that RaptorUK...
But I simply cannot see the need of a third condition!
In my (humble) point of view, a zero cross always implies:
X (n)>0 && X (n+1)<0 and vice versa!
.
.
The issue is that I cannot get these distances! :(
Thank you soo much for your help RaptorUK! :)
.
I'm pretty sure you're right about that RaptorUK...
But I simply cannot see the need of a third condition!
In my (humble) point of view, a zero cross always implies:
X (n)>0 && X (n+1)<0 and vice versa!
.
The issue is that I cannot get these distances! :(
Your array has a size of zero elements . . .
double DIF_MA[];
. . . and even if it was correct, you can't use DIF_MA[index+1] as you haven't calculated it . . .
Try this . . . .
.
It works! :)
And now, it makes so much sense!!
I'm very newbie about the arrays. This was a great lesson to me!
I'm starting to get in the concept of the Arrays..
Thank you so much RaptorUK!! :)
Here is the correct code, in case someone needs it..
.
It works! :)
And now, it makes so much sence!!
I'm very newbie about the arrays. This was a great lesson to me!
I'm starting to get in the concept of the Arrays..
Thank you so much RaptorUK!! :)
:-) you are very welcome.