//+------------------------------------------------------------------+ //| test.mq4 | //| Copyright 2014, Kajos | //| http://www.eaeffect.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2014, Kajos" #property link "http://www.eaeffect.com" #property version "1.00" #property strict string gsa_commentArr[]; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void OnStart() { for(int i=0;i<25;i++) { ResetLastError(); comment("day[i]: "+(string)iTime(Symbol(),Period(),i)+ " | day : "+(string)TimeDayOfWeek(iTime(Symbol(),Period(),i))+ " error : "+(string)GetLastError()); Sleep(300); if(TimeDayOfWeek(iTime(Symbol(),Period(),i)!=3)) { continue; } else { comment("found date: "+(string)iTime(Symbol(),Period(),i)); break; } } } //+------------------------------------------------------------------+ void comment(string str) { const int cli_rowCnt=26; int li_aCnt=ArrayRange(gsa_commentArr,0); string ls_tmp=""; if(li_aCnt