Try the following code here: int objs = ObjectsTotal(ChartID()); string name; for(int cnt=objs-1;cnt>=0;cnt--) { name = ObjectName(ChartID(), cnt); if (StringFind(name, "FXSSI.CALENDAR#news-country") > -1) { string currency = ...