Discussion of article "Manual charting and trading toolkit (Part II). Chart graphics drawing tools"

 

New article Manual charting and trading toolkit (Part II). Chart graphics drawing tools has been published:

This is the next article within the series, in which I show how I created a convenient library for manual application of chart graphics by utilizing keyboard shortcuts. The tools used include straight lines and their combinations. In this part, we will view how the drawing tools are applied using the functions described in the first part. The library can be connected to any Expert Advisor or indicator which will greatly simplify the charting tasks. This solution DOES NOT use external dlls, while all the commands are implemented using built-in MQL tools.

I believe that a trend line can carry a double load.

On the one hand, it shows a limit on the rate of price change ("not faster", if the price is below the line, or "not slower", if the price is above the line).

On the other hand, if the straight line is limited in price and time (is not a ray), then it can indicate levels (both prices and time). Of course, we could use a rectangle or something else for these purposes, but a diagonal line is clearer, in my opinion.

So, I have modified modify the CGraphics::DrawTrendLine function. First, the line now continues into the future for a limited amount of time, thus indicating the estimated price. Secondly, for clarity, I have added usual levels - horizontal and vertical.

It looks like this:

Limited trend lines

Of course, the length of the line (how many times the total length is greater than the distance between the initial points), the number of bars for extreme values and other features of the straight line are configured in the EA parameters.

Author: Oleh Fedorov

 
Thanks for your work and openness, very handy tool! Could you tell me what code changes are necessary to make it possible to change the size of a short or extended horizontal level only horizontally when drawing a short or extended horizontal level, if there is a need to extend the lines but without vertical displacement?
 
Валерий Кожухарь:
Thanks for your work and openness, very handy tool! Could you tell me what code changes are necessary to make it possible to change the size of the horizontal level only horizontally when drawing a short or extended horizontal level, and to extend the lines without vertical displacement?

If I understood the question correctly, the "L" or "S" button will help you. The parameter in the settings is "Short level length" (in pixels and in bars). However, now this parameter also affects the vertical line with levels (more precisely, the length of levels). There is also "Coefficient for long level" - the default value is 2.

And, finally, you can change the scale of the chart. If the scale is reduced, the line drawn with the "L" or "S" key is lengthened. On verticals - remains the same size.

If everything works, you won't need to change anything in the code.... If something is wrong, please describe in detail what you want.

Well, and, in principle, somewhere approximately on the way (I want to complete within a month) GUI, which will allow _each_ line to draw in its own way ... We can wait ;-)

Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Свойства объектов
Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Свойства объектов
  • www.mql5.com
Все объекты, используемые в техническом анализе, имеют привязку на графиках по координатам цены и времени – трендовая линия, каналы, инструменты Фибоначчи и т.д.  Но есть ряд вспомогательных объектов, предназначенных для улучшения интерфейса, которые имеют привязку к видимой всегда части графика (основное окно графика или подокна индикаторов...
 
good job for you . but im price action trader can you create one of indicator with text marking ,im many waste the time front of chart only marking with text. ihave indicator but not showing text option. https://www.forexfactory.com/thread/701432-color-levels-indicator
 
Getting a bunch of errors when I try to compile the MQ4 version 
 
Jagg:
Getting a bunch of errors when I try to compile the MQ4 version 
It's very big surprise for me, because I was testing it when posting, and I use this library  by myself right now...

I'll try to repair it shortly...
 
fainzslanasaputra:
good job for you . but im price action trader can you create one of indicator with text marking ,im many waste the time front of chart only marking with text. ihave indicator but not showing text option. https://www.forexfactory.com/thread/701432-color-levels-indicator

I can but  I need more information. What concretely do you need? We can continue our discussion in private or by the "Personal order" (my login name is "certain")...

I have some works with price action, may be it will be useful for you...

 
Oleh Fedorov:
It's very big surprise for me, because I was testing it when posting, and I use this library  by myself right now...

I'll try to repair it shortly...
There are some problems with space symbols in comments... Try to remove spaces between variables and comments in those strings where compiler write "Declaration without type". Right version of file was sending to moderator, so I suppose he will attache it to article as soon as he can.
 

Thank you for developing this article, it is very useful for me. Where can I find the libraries used?

 
Facundo Laje:

Thank you for developing this article, it is very useful for me. Where can I find the libraries used?

Attachments?
 
Oleh Fedorov:
Attachments?

Yes, thanks Fedorov, I was reading the article from Android and the attachments were missing, but when I read it from the computer I found them!