Errors, bugs, questions - page 118

 
Interesting:

Good time all.

Who knows how to correctly calculate GMT time based on local and server time (necessarily including daylight saving time/winter time and time zone)?

I saw an example of daylight saving time calculation on MQL4 forum, but cannot find it... :(


Try to use this function

TimeGMTOffset().

It returns the current difference between GMT time and the local time on your computer in seconds, taking into account daylight saving time or daylight saving time. Depends on time settings on user's computer.

Here is another function

TimeGMT()

Returns GMT calculated with summer/winter time and local time of the computer that started the client terminal. There are 2 versions of this function.

 
sergey1294:

Try using this function

TimeGMTOffset()

Returns the current difference between GMT time and local time on your computer in seconds, taking into account daylight saving time. Depends on the time settings on the user's computer.

Here is another function

TimeGMT()

Returns GMT calculated with summer/winter time and local time of the computer that started the client terminal. There are 2 variants of this function.

Do I look like an American (may M. Zadornov forgive me for plagiarizing)?

The point is that these functions are good only for real and demo accounts, they are not effective in the Strategy Tester (because any time is a server time).

PS

I need the same functionality working everywhere + possibility to calculate what was the GMT time for a certain historical date (for a certain bar)...

 
Interesting:

Do I look like an American (may M. Zadornov forgive me for plagiarism)?

The thing is these functions are good only on real and demo accounts, they do not work in tester (because any time is server time).

PS

I want the same functionality, that works everywhere + the possibility to calculate what was the GMT time for a certain history date (for a certain bar)...

I didn't even think they don't work in the tester
 
sergey1294:
I didn't even think they do not work in the Strategy Tester

Generally, I need it to keep trading history and FA analysis (based on news calendar) by GMT.

I offered the developers a million years ago to add news calendar to the terminal + appropriate functionality in MQL.

But it's still there, I have to do everything the old-fashioned way, using the autogen.... :(

 

Does EventChartCustom work ?


I am trying to send a custom event to the chart, like this

Result = true;

ResetLastError();

RolloverCountDay = RolloverCountDay+1;

UserEventID = UserEvent_TimerRolloverDay-CHARTEVENT_CUSTOM;
MessageText = StringFormat(MsgTimerRolloverDay,RolloverCountDay);

//We refer user event of the work chart
EventChartCustom(0,(ushort)UserEventID,0,0,MessageText);

//Checking for presence of the errors
  if(_LastError!=0)
  //В результате работы произошла ошибка
  {
  Result = false;  
  }

But the chart does not receive the event (check in the tester).

PS

Everything is OK on the demo, but it refuses to work in the tester...

32 bit, build 319...

 

Good afternoon, everyone.

I have a multicurrency EA using standard iMAs. I have tested it on my Tester and on my Demo account and it works fine, like clockwork. I have sent it to the Championship and it shows Expert removed because indicator cannot load. Please advise what may be the reason?

 
_Dude_:

There is a multicurrency EA using standard iMAs. In the Strategy Tester and on demo account everything is OK, it works like clockwork. I sent it to the Championship and it shows Expert removed because indicator cannot load. Please advise what may be the reason?

We will deal with it.

 
Interesting:

Does EventChartCustom work ?


I am trying to send a custom event to the chart, like this

But the chart does not receive the event (check in the tester).

PS

Everything is OK on the demo, but it refuses to work in the tester...

32 bit, build 319...

Can you give me the full code?
 
Urain:

Yeah, yeah, there is such a thing, if you add a new beginning to an already prepared word, then such a glitch slips through.

Can you describe the steps in more detail? What text is there, what and where you add, what you get.

Yeah, don't forget to specify version, bit rate, axis, etc.

 
alexvd:

Can you describe the steps in more detail? What text is there, what and where you add, what you get.

Yes, don't forget to specify version, bit rate, axis, etc.

Source text :
mother washed the frame.
We will add the str, after which the hint window will appear.
and we get it after we hit [Enter]:
We add in the beginning of the word :
strstring mum washed the frame
Add at the end of the word :

mommy washed the frame .

I think that after the disclaimer that the bug is climbing only with Cyrillic, the rest is not important, just in case 319 build 32 bits.

Reason: