I wanted the lines to not appear at all on daily/weekly charts so I added the following code after each ObjectCreate line :

ObjectSet(gridname, OBJPROP_TIMEFRAMES, OBJ_PERIOD_M1 OBJ_PERIOD_M5 OBJ_PERIOD_M15 OBJ_PERIOD_M30 OBJ_PERIOD_H1 OBJ_PERIOD_H4);