Inserted Code stringTimeStart = 22:00;//10PM stringTimeEnd = 10:00;//10AM of next day stringBrokerDate; int_TimeStart,_TimeEnd; //these should be within beginning() NEVER within init if (TimeCurrent() gt; _TimeEnd) //first time this may remain accurate ensuring BrokerDate is valid //why people do this? To ensure that BrokerDate and _TimeEnd will not finish at a /mouse race BrokerDate = TimeToStr(TimeCurrent(),TIME_DATE); _TimeStart = StrToTime(BrokerDate TimeStart); _TimeEnd = StrToTime(BrokerDate TimeEnd); if (_TimeStart gt; _TimeEnd) _TimeEnd = _TimeEnd 86400; //add 1 day //currently openly use _TimeStart and _TimeEnd to compare with TimeCurrent()Originally Posted by ;
This code is written for EA/Script.
Depending on where you want to utilize this, it could have different effects.