View Single Post
  #288 (permalink)  
Old 11-19-2008, 05:11 PM
ValeoFX's Avatar
ValeoFX ValeoFX is offline
Senior Member
 
Join Date: Jan 2006
Location: Johannesburg, South Africa
Posts: 1,370
ValeoFX is on a distinguished road
Quote:
Originally Posted by mladen View Post
There are two coding errors in that indicator :
  • as I stated in my previous post already, it is looking for crosses comparing current and future value (I sincerely doubt that it was the intention)
  • also buffer values are not emptied on every loop. As a result, there are cases when indicator is going to become a "repainter" (cases when it posts signal for crossing and then, before the bar expires, values change back - since the buffer values are not cleaned (emptied), the "cross" is still remaining there, but if you change time frames or symbol and go back, or restart mt, it will disappear - effectively becoming a repainting indicator) Author did try to avoid that situation with fixed bar count (always recalculating the CountBars bars) but it means that the indicator is almost always recalculating unnecessarily
Hope this is explicit enough
regards
mladen
Very much so as I have come to know you, Mladen and I thank you for this kind explanation.

Would you therefore suggest that the other version (ADX_CrossesNonrepainting), be the correct one to use?

I await your expert advise with baited breath. Thanking you most sincerely.
__________________
"Risk comes from not knowing what you are doing" The Tao of Warren Buffett.

"Avoiding mistakes, makes people STUPID and having to be RIGHT, makes you OBSOLETE." Robert Kiyosaki.
Reply With Quote