The arrow array (arrowar) you are checking for a Buy alert isn't zero by default. When there is no arrow, the array's value is EMPTY_VALUE. So, you need to change > 0 to != EMPTY_VALUE.
However, this won't fix everything for you.
You also need to check color array (arrowcl you are checking for a Sell alert) to determine whether it is a Buy or Sell signal.
arrowar assumes a non-empty value whenever there is any signal at all - be it Buy or Sell. Then the arrowcl array is changed based on whether it is a Buy (0) or Sell (1), so your two conditions have to look like this:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.