I found out that it skips some of the crosses because some times in the bar 2, both MAs have the same value. So, the condition above weren't
become true.
Before I realize that what cause this problem is that I normalized the value of MAs , I wrote this code to make sure I'm not lose any cross:
1 - Is it possible to have the same value for two MAs if I don't normalize them? In other words do I need to use or is it better to use the function
above or I can trust the same simple code?
2- Can you please double check this function and tell me if you see anything wrong with it?
By mistake I normalized the values I'm getting from iMA with Digits.
Then , I was using this for finding the cross. (vice versa for cross down)
I found out that it skips some of the crosses because some times in the bar 2, both MAs have the same value. So, the condition above weren't become true.
Before I realize that what cause this problem is that I normalized the value of MAs , I wrote this code to make sure I'm not lose any cross:
My questions are:
1 - Is it possible to have the same value for two MAs if I don't normalize them? In other words do I need to use or is it better to use the function above or I can trust the same simple code?
2- Can you please double check this function and tell me if you see anything wrong with it?
Regards.