BUG drawing arrow over rectangle.

 
Build 211, October 15, 2007


I am using following subroutines to draw arrow and rectangle in separate window
Both work a OK in separate bars.

However, if I draw both the arrow and rectangle in same bar the arrow will pickup color of the rectangle and rectangle stops expanding with next bar.

//+------------------------------------------------------------------+ 
void Rectangle(string N, int C, int T)
   {
   if(MyWindow< 0)return;
   
   if(ObjectFind(N) == -1)
      {
      ObjectCreate(N, OBJ_RECTANGLE, MyWindow, T, -0.0025, T, 0.0025);
      ObjectSet(N, OBJPROP_COLOR, C);
      ObjectSet(N, OBJPROP_BACK, 1);   
      }
   else
      {
      ObjectSet(N, OBJPROP_TIME2, T);
      ObjectSet(N, OBJPROP_PRICE2, 0.0025);
      ObjectSet(N, OBJPROP_COLOR, C);                 
      } 
   }
//+------------------------------------------------------------------+   
string Arrow(string N, int T1, double P1, int C, int W, int Win)   
   {
   if(MyWindow< 0)return(N);

   ObjectCreate(N, OBJ_ARROW, Win, T1, P1);
   ObjectSet(N, OBJPROP_ARROWCODE, 2);
   ObjectSet(N, OBJPROP_COLOR, C);
   ObjectSet(N, OBJPROP_WIDTH, W);
   return(N);
   }    
   }


 
Not enough to go on above, try specifying the background setting 0/1 of the arrow
 

Not enough to go on above, try specifying the background setting 0/1 of the arrow


Well, if the OBJPROP_BACK is not set it should be default "false" value.
I have just double checked it for the arrow background true/false and there is no effect on it.

However, if it would be the background the rectangle would not stop expanding with next bar when the arrow is added.
 
The problem resolved!
Cause: Conflict in ObjectName between the Rectangle and Arrow.
Reason: