Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 760

 
artmedia70:

Was doing vertical scrolling in an empty indicator window. Here's the function:

As an example of using a single colour message (you can have 4 colours in one line for different words):

There should be an empty indicator named Win_Inform on the chart.

Thank you!

I've read it, the principle is clear.

To implement such a function, one detail is missing:

- how to take out those info messages, which MT4 gives out on the "Log" and "Experts" tabs ?

(I'm going to store them in a string array of stack type and display them on the main screen, plus I'll add news and get a decent thing))))

 
 
tuner:

Found the cause of this problem: https://forum.mql4.com/33023

As expected, it's practically a bug in the StringToTime function. All the symptoms fit together. This function converts string "23:59" to datetime with local PC date instead of MT4 date. And in the tester, as we know, the date of the local PC is emulated and equated to the terminal time. That's why everything works properly in the tester, but the demo/real time results in glitches and losses. Of course, the documentation does not say where the date is coming from and the link above shows that this problem was reported 4 years ago, but apparently the methaquotes do not care.

And before you repeat someone else's nonsense, can't you check it?

It does not matter what time StringToTime() function counts seconds from 01.01.1970 00:00:00 GMT, UTC, server time or local time, the most important thing is that from this date XXX seconds passed to the specified time. And when you set the check time, it is also calculated from 01.01.1970 00:00:00 according to the specified by you time. In other words, in the condition if(TimeCurrent() >= StringToTime("23:15"), it means that if the server time from 01.01.1970 00:00:00 passed as much or more seconds than the specified check time ofXXX seconds. And there is no confusion about it.

Especially for you I made a screenshot, read the comment and then experiment.


Your problem may be that the trade may end at 23:00

 

Good afternoon!

Can you please tell me what is wrong with my indicator?

First, it only works until the bar changes.

Secondly, it does not draw a line.

If anyone understands what is wrong, I will be very grateful)

Files:
priceiup.mq4  3 kb
 
Blik:

Good afternoon!

Can you please tell me what is wrong with my indicator?

First, it only works until the bar changes.

Secondly, it does not draw a line.

If anyone understands what is wrong, I will be very grateful)

What do you want to get with it?
 
Teak price calculation
 
Dear Sirs programmers! How to pull out to a string variable the information messages, which MT4 shows in the "Journal" and "Experts" tabs ?
 
Blik:
Calculating the price of a tick
Look for tick indicators
 
_new-rena:
Dear Sirs programmers! How to pull out into a string variable the informational messages, which MT4 gives out on the "Journal" and "Experts" tabs ?
If the question sounds like "where to look for data source", then by right-clicking on information messages of the appropriate tab and pop-up menu with Open item you may find out that the log messages are in logs located in the folder "<MT4 install dir>\logs" and the experts messages are in the folder "<MT4 install dir>\MQL4\Logs". The name of the file is built according to "YYYYMMDD.log" pattern. The file with current date is constantly updated when new messages are received.
 
simpleton:
If the question sounds like "where to look for data source", then by right-clicking on information messages of the corresponding tab and pop-up menu with Open item you may find out that log messages are located in log files located in directory "<MT4 install dir>\logs", and expert messages - in directory "<MT4 install dir>\MQL4\Logs". The name of the file is built according to "YYYYMMDD.log" pattern. The file with the current date is constantly updated when new messages are received.

ok.

so it cannot be caught on the fly, i.e. at the moment the log entry is generated?

Reason: