Vertical line. - page 5

 
Taras Slobodyanik:

In MT5, period values are not equal to the number of minutes as in MT4

Thank you.

 
To solve problems with vertically and slanted segments I decided to use DRAW_COLOR_SECTION + DRAW_COLOR_HISTOGRAM2, but got excited early! If the slanted segments are one after the other, namely in that candle where the first segment ends and the other segment should start, then DRAW_COLOR_SECTION simply draws a line from the beginning of the first segment to the end of the second segment. DRAW_COLOR_ZIGZAG for some known reason cannot be used (I even don't see the sense of this style of indicator, as it works at the moment!), I will have to add one more buffer with separate conditions to avoid if the first segment ends at the same bar where the second segment begins.
P.S. Something has not ah-you since my first introduction to MT5.
 

draw using graphical objects and do not rack your brains)
because then you'll have to deal with a lot of your buffers - what's drawn where... (and explain it to customers if you're selling)

savetoindicator buffers only what you need for EA - one buffer for upper points, the second for lower points (or all as two zigzags)

 
Nauris Zukas:
To solve problems with vertically and skewed bars I decided to use DRAW_COLOR_SECTION + DRAW_COLOR_HISTOGRAM2, but got excited early! If the slanted segments are one after the other, namely in that candle where the first segment ends and the other segment should start, then DRAW_COLOR_SECTION simply draws a line from the beginning of the first segment to the end of the second segment. DRAW_COLOR_ZIGZAG for some known reason cannot be used (I even don't see the sense of this style of indicator, as it works at the moment!), I will have to add one more buffer with separate conditions to avoid if the first segment ends at the same bar where the second segment begins.
P.S. Something I haven't ah-ha-ha from my first introduction to MT5.

You can simply overlay DRAW_COLOR_ZIGZAG with DRAW_COLOR_HISTOGRAM2

The one above will be the one that fills last.

 
Taras Slobodyanik:

draw using graphical objects and do not rack your brains)
because then you'll have to deal with a lot of your buffers - what's drawn where... (and explain it to customers if you're selling)

savetoindicator buffers only what you need for EA - one buffer for upper points, the second for lower points (or all as two zigzags)

This will be completely new to me. Do slant and vertical sections with OBJ_TREND? There's a solid line in the example, but can I do line segments? I'd like more details on what to use, I don't want to go in the wrong direction at the very beginning.

 
Alexey Viktorov:

You can simply overlay DRAW_COLOR_ZIGZAG with DRAW_COLOR_HISTOGRAM2

The higher one will be the one filled last.

You should give it a try, maybe it'll work already!

 
Nauris Zukas:

You should give it a try, maybe it'll work already!

It will all work out. You can see an example of an overlay here.


TicksVolume
TicksVolume
  • www.mql5.com
Индикатор показывает изменение цены в пунктах и сколько раз за период произошло изменение в течение выбранного периода, к сожалению только от момента запуска до момента остановки. Входящих параметров не имеет. Возможно использование для определения скорости и/или ускорения изменения цены. На скрине видно, что Volume равно 44, индикатор...
 
Nauris Zukas:

This is going to be a whole new thing for me. Should I do slope and vertical segments with OBJ_TREND? There's a solid line in the example, can I do line segments? I'd like more details on what to use, I don't want to go in the wrong direction at the very beginning.

yes do OBJ_TREND(in the figure, in the example, a line is drawn with rays to the right and left)

The function of drawing the trend line and call it each time when the line is to be drawn.
And make the buffers invisible.

that is, we do it in a loop:

- a signal appears, save the line points to the buffers (top-bottom)
- draw a line on these points


We have - point buffer and trend lines on the graph, without any perversions with lots of styles and buffers.

 
Taras Slobodyanik:

yes do OBJ_TREND(in the figure, in the example, a line is drawn with rays to the right and left)

We can take the function that draws trend lines and call it every time a line is to be drawn.
Make the buffers invisible.

that is, we do it in a loop:

- a signal appears, save line points to the buffers (top-bottom)
- draw a line on these points


We have - point buffer and trend lines on the graph, without any perversions with a bunch of styles and buffers.

Thanks, I'll make that option later too.

 
Alexey Viktorov:

It will all work out. You can see an example of an overlay here.


Because DRAW_COLOR_ZIGZAG does not properly colour the segment before the vertical line, this is not an option. Or did you have another way of doing it?


Files:
Reason: