arrow in EA

 
Hi,
Please help me.
I am only a beginner here and making arrow sign on chart.
I wrote the next:
if(......)
{
ObjectCreate("ObjectName", OBJ_ARROW, 0, TimeCurrent(), Bid);
ObjectSet("ObjectName", OBJPROP_ARROWCODE, 233);
ObjectSet("ObjectName", OBJPROP_COLOR, Blue);
}
I am testing with tester and on the chart I get only the first arrow when met the ' if ' condition.

When I put on the demo chart get the same, only one arrow .:))

Thanks for any answer.
Susanna



 
 
You must use unique names of objects, for example:


int arrowCounter;
if(......)
         {
         ObjectCreate("ObjectName"+arrowCounter, OBJ_ARROW, 0, TimeCurrent(),Bid);
         ObjectSet("ObjectName"+arrowCounter, OBJPROP_ARROWCODE, 233);
         ObjectSet("ObjectName"+arrowCounter, OBJPROP_COLOR, Blue);
         arrowCounter++;
         }
 
Rosh:
You must use unique names of objects, for example:


int arrowCounter;
if(......)
         {
         ObjectCreate("ObjectName"+arrowCounter, OBJ_ARROW, 0, TimeCurrent(),Bid);
         ObjectSet("ObjectName"+arrowCounter, OBJPROP_ARROWCODE, 233);
         ObjectSet("ObjectName"+arrowCounter, OBJPROP_COLOR, Blue);
         arrowCounter++;
         }
 
Hi Rosh,  Thanks for your advice.Now it is working fine, :)) Have a good day. Susanna
 
You're welcome, Susanna.
Reason: