Questions from Beginners MQL4 MT4 MetaTrader 4 - page 163

 
Alexandr Sokolov:

I want to see the code of indicator (MQL4) with DRAW_COLORLINE, because I can't make one line colored without using several buffers. I want to see the working variants, but I can't find them in kodobase and in the end there is a colored indicator from MQL, but they made it based on additional buffers. How does DRAW_COLORLINE work in MQL4? The fact that Meta Unit 4 accepts DRAW_COLORLINE is strange, but it is not present in MQL4 documentation

In mql4, there is no colour buffers. It is only possible to make several buffers - for each colour its own buffer.

DRAW_COLORLINE is from mql5

 
Artyom Trishkin:

There are no colour buffers in mql4. Only do multiple buffers - a different buffer for each colour.

DRAW_COLORLINE is from mql5

Thank you

 
Guys, since the beginning of the week decided to continue trading on a demo account after a 2 week break, but metatrade 4 stopped working, when I start it works for a second or so and then crashes, reinstalling it didn't help, I thought about switching to metatrade 5 - it has the same nonsense. Please help, thanks in advance for answers and advice!
 

Greetings. Congratulations on the upcoming holidays.

Can you tell me if it is possible to call the function not at the moment the tick arrives, but by time? For example, a second before the new hour.

 
Andrey Sokolov:

Greetings. Congratulations on the upcoming holidays.

Could you please tell me if it is possible to start calling the function not at the moment the tick arrives, but by time? For example, a second before the new hour.

Yes. There is such a possibility.

 
Alekseu Fedotov:

Yes. There is such a possibility.

Thank you. And how?

 
Andrey Sokolov:

Thank you. How?

Timer
 
Andrey Sokolov:

Thank you. How?

It is only theoretically possible. But in reality the trading server time and the computer time can be different and when the local time, on which the timer works, is "without 1 second new hour", then according to the server time the new hour has already arrived.

 
Alexey Viktorov:

This is only theoretically possible. But in reality the trading server time and the computer time can be different and when the local time on which the timer is running is "without 1 second the new hour", the server time has already given the new hour.

And there can be even more problems when there is no tick, but the timer will queue and by the time the timer executes, there will already be a 1 second new bar.
 
Alexey Viktorov:

This is only theoretically possible. But in reality the time of the trading server and the computer time can be different and when the local time, on which the timer works, is "without 1 second the new hour", the server time is already the new hour.

In practice, there is no problem either - you have to synchronise the time of the broker and the computer - and work according to that time.

Reason: