Adding line every 12.00 - page 2

 
if(TimeHour(Time[0])==10 && TimeMinute(Time[0])==0)
      
ObjectDelete("virsus");
ObjectDelete("apacia");

      
 if(TimeHour(Time[0])==11 && TimeMinute(Time[0])==0) 
      ObjectCreate("virsus", OBJ_HLINE, 0, Time[0], High[0] + (200 * Point));
      ObjectSet("virsus", OBJPROP_COLOR, Red);
      ObjectSet("virsus", OBJPROP_WIDTH, 1);
     
    
 if(TimeHour(Time[0])==11 && TimeMinute(Time[0])==0)      
      ObjectCreate("apacia", OBJ_HLINE, 0, Time[0], High[0]);
      ObjectSet("apacia", OBJPROP_COLOR, Blue);
      ObjectSet("apacia", OBJPROP_WIDTH, 1);
     
   
    
    double virsus = ObjectGet("virsus", OBJPROP_PRICE1);
    double apacia = ObjectGet("apacia", OBJPROP_PRICE1);
    
Thanks raptoruk, that was helpful :) will post tommorrow if something else is not ok :)
 

Another idea, you also can consider using iiBarShift( string symbol, int timeframe, datetime time, bool exact=false). for the time parameter you can use StrToTime ("12:00").

Then you get the shift of the candle bar that is at 12:00. Then you draw the line, at its high/low.

Ref: https://docs.mql4.com/series/ibarshift

Reason: