Questions from Beginners MQL5 MT5 MetaTrader 5 - page 844

 
Vitaly Muzichenko:

OBJ_TREND draws a straight line by points (datatime,price), i.e. there is a binding to the time of a particular bar. I don't need such a binding. I would like the vertical line to pass between two adjacent bars. This can be done using a rectangular marker whose coordinates are specified in pixels. You simply calculate the pixel coordinates so that they lie between the bars and draw the rectangular marker. Is there a different, simpler way to do this?

 
Artyom Trishkin:
I'll give you a hint: Canvas.
Thank you, Artyom. I'll try your option.
 
I've looked through all the documentation. Am I missing something or, irl, is there no option to overload operators in MQl5?
 
Alexey Loginov:
I've looked through all the documentation. Am I missing something or is there no possibility to overload operators in MQl5?

Overloading operations

 
Vladimir Karputov:

Overloading operations

Jesus! A second 24 hours without sleep has cut my attention span off at the root. I should get some sleep. Thank you,@Vladimir Karputov.

Sorry for ignoring the skilful use of search.

 
MrVIS:

Dear forum users, could you please tell me how to draw a vertical segment between bars without using a rectangular label(OBJ_RECTANGLE_LABEL)? Unfortunately, I haven't found an answer to this question. If there's something I haven't read in the documentation or forum, please point out where. Thank you.

Normal vertical line with this Terminal setting


 
fxsaber:

Normal vertical line with this Terminal setting


I'm interested in how this can be done programmatically. Nevertheless, thanks for your feedback.

 
MrVIS:

I am interested in how this can be done programmatically. Thanks for your feedback, though.

Show me a screenshot of what you want to do and how it should look on the graph.

 
MrVIS:

I'm interested in how it can be done programmatically. Nevertheless, thanks for your feedback.

You put the line through MQL.

 
Vitaly Muzichenko:

Show a screenshot of what you want to do and how it should look on the graph.

I would like to get something similar to the one shown in the screenshot. However, I can't figure out what parameters to set to get an analogue to the terminal settings "Settings/Graphics/Precise timeline", and how to set the anchor points to the coordinates between the bars.

Files:
Reason: