How to place order with object arrow.

 

HI, I just want to place order when arrow signal (object ) appear on a current bar since I can not use icustom.

I think I can check object to find arrow and if arrow signal time=Time[0], then place order.

Is this correct?


 void get_signal(){
   
   if (ObjectsTotal() == 0) { return(0); }
  
   int i;
   for (i=0;i<ObjectsTotal();i++){
      string name = ObjectName(i);
      if(StringFind(name,"ArrBuy",0) == 0){
            double rctime = ObjectGet(name,OBJPROP_TIME1);
            if(rctime == Time[0]){
             //BUY ORDER.......

                 
            }
      }

   }
  
} 


 

You need ObjectCreate():

next you need ObjectSetInteger();

ObjectGet(); doesn't make anything.

 void get_signal(){
   
   if (ObjectsTotal() == 0) { return(0); }
  
   int i;
   for (i=0;i<ObjectsTotal();i++){
      string name = ObjectName(i);
      if(StringFind(name,"ArrBuy",0) == 0){
            double rctime = ObjectGet(name,OBJPROP_TIME1);
            if(rctime == Time[0]){
             //BUY ORDER.......

                 
            }
      }

   }
  
} 
 

Thank you so much.

The indicator has already had object, so I can only scan all objects on the chart and pick up ArrBuy object, it that right?