Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 760
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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))))
https://book.mql4.com/ru/build/info
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)
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)
Calculating the price of a tick
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 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?