Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 688

 
Taras Slobodyanik:

Of course they did and do.

It's better to divide from the past to the future)
(well, keep in mind that some characters open at 1am and some at 9am)

They say that no matter how accurately a lecturer expresses himself, there will always be those who misunderstand him.

My question:

What is the best way to extend the "period separators" to the forecast area ???

suggests an answer at the level of the program code, not the procedure for finding the delimiters itself. The procedure itself is already clear and simple.

I asked how to do it better and easier:

- Change the code of the standard library, or write your own?

- Which files of the standard library are responsible for this procedure?

- Maybe there are ready-made solutions to this question? - Then where are they.

and so on.

In other words - who knows what on this subject?

 
neverness:

the procedure itself is already clear and simple.

Well, you haven't started doing it yet)


neverness:

My question:

What is the best way to extend the "period separators" to the forecast area ???

so and extend the current time + period separator... and so on

 
Taras Slobodyanik:

well, you haven't started doing it yet)

and extend the current time + separator period... and so on.

Not only have you started it, but I've finished it a long time ago. But in another program environment.

I'm interested in MQL4/MQL5, has anyone actually started it or not?

And what are the peculiarities of this process implementation in MQL4/MQL5 programming environment?

 
neverness:

Not just started, but finished a long time ago. But in a different software environment.

I'm interested in MQL4/MQL5 or not?

And what are the peculiarities of implementation in MQL4/MQL5 programming environment?

It's difficult to say what you want, as far as I understand, you want to see vertical lines to the right of the bar number 0, these lines should correspond to standard TFs.

if this is the MT4 task, you need to shift the indicator buffers using SetIndexShift() and draw vertical lines with the DRAW_HISTOGRAM type

 
Igor Makanu:

it is difficult to say what you want, as far as I understand, you want to see vertical lines to the right of bar #0, these lines should correspond to the standard TF

if this is an MT4 task, you need to shift the indicator buffers using SetIndexShift() and draw vertical lines with DRAW_HISTOGRAM type

Exactly right. I want to see the vertical lines of period separators to the right of bar #0.

But why move indicator buffers for this purpose? Why is it so difficult?

We can, for example, just draw the dividers "automatically" - to extend the existing dividers.

But to do that, you need the coordinates of the existing delimiters (at least the last 2).

The only question is how to get these coordinates.

Yes, and update the picture should be together with updating of already existing delimiters.

It would be interesting to get the program text that draws the standard delimiters.

 
Artyom Trishkin

I'll be honest with you. I had no idea that this topic would cause so many problems and require some kind of "discussion".

I was just hoping to get a link to an indicator, or a library file that performs this standard procedure.

I would like to ask :

Which program/programs perform the construction of standard separators in MT4 ???

 
neverness:

I'll be honest with you. I had no idea that this topic would cause so many problems and require some kind of "discussion".

I was just hoping to get a link to an indicator, or a library file that performs this standard procedure.

I would like to ask :

Which program/programs perform the construction of standard separators in MT4 ???

it's an old MT4 bug - it didn't know how to draw in the future :-( to the point that the builds made "by hand" got knocked down after the weekend.

don't know if they fixed it or not (more likely not, 4 is abandoned in terms of features), but for manual drawing I have to use third party, not cheap programs

 

for 4 myself, I have to use a self-written script once a week that arranges vertical lines and captions. (Price/time scales by the way are also "...not in the red army")

 
Maxim Kuznetsov:

it's an old MT4 bug - it couldn't draw in the future :-( to the point where builds made "by hand" got knocked down after the weekend.

i dont know if it was fixed or not (more likely not, 4 is abandoned in terms of features), but for manual drawing i have to use third party, not cheap programs

Has something changed in MT5 ???

 
neverness:

But why move the indicator buffers to do this? Why is it so complicated?

You could, for example, just draw delimiters "automatically" - just extend existing delimiters.

This is not complicated, but you probably don't understand how indicators work in MT and what their advantages are.

The indicator has an advantage over the Expert Advisor and the script, it's the indicator buffers, which in turn are arrays of double type, i.e. for the programmer to draw something in the indicator just fill the array with values and that's all - the rest is done by the terminal. But one should understand that every element of the array (indicator buffer) is strictly connected with the bar index. So, to solve your problem, we should put the value in the indicator buffer where there are no bars (future), and the array index cannot be negative, right? For this you need to shift the indicator buffer with SetIndexShift().

If you draw using graphical objects, you don't need an indicator, you simply execute the script which draws OBJ_VLINE objects and unload the script. I don't like graphical objects, about 5 years ago MT4 was very slow and if I draw a hundred graphical objects I feel sluggish, now MT4 is very productive, probably without any problems and graphical objects won't slow down the terminal

ZS: here i found an example in kodobase - draws vertical lines with indicator buffershttps://www.mql5.com/ru/code/23009

Time_Bar_Custom_Weekly
Time_Bar_Custom_Weekly
  • www.mql5.com
Индикатор строит по одной вертикальной линии на графике в сутки в фиксированный в настройках момент времени один раз в неделю. Отрисовка линий происходит с помощью индикаторных буферов и . Целесообразно располагать этот...
Reason: