Drawing Short Horizontal Lines - page 2

 

hi GumRai,

Draw a rectangle label just a few pixels wide. 

 Rectangles are drawn using time/price not x,y coords. 

 
sd59:
Sorry, what is this? MQL?
Of course.
 
sd59:

hi GumRai,

Draw a rectangle label just a few pixels wide. 

 Rectangles are drawn using time/price not x,y coords. 

Yes, I know, but I didn't suggest a rectangle,

I suggested that a rectangle label could be used.

OBJ_RECTANGLE_LABEL

which uses x and y co-ordinates. 

 

I suggested that a rectangle label could be used. 

ah sorry thanks.

(how the hell do you quote people on this?) 

 

hi angevoyageur,

Please can you point me to the documentation that shows this MQL code because I have never seen anything like it.

also I put your code in a script and it didn't compile.

thanks 

 
sd59:

hi angevoyageur,

Please can you point me to the documentation that shows this MQL code because I have never seen anything like it.

also I put your code in a script and it didn't compile.

thanks 

It's not documented yet on mql4 (I don't know why), it uses a Standard Library class : CCanvas. I am aware of this feature as I know mql5 too.

It works with a bitmap label object and a resource to draw the lines.

This code should compile with build 670 and further.

Files:
draw.mq4  2 kb
 
thanks very much.
 
sd59:


(how the hell do you quote people on this?) 

Bottom right of the post, click reply.

Cursor has to be in the window to see the "reply"

Also as people are so fond of posting extremely wide sections of code, the "reply" may be off your screen to the right, so not visible without scrolling to the right. 

 
great, cheers.
 

Hi angevoyageur,

I got this to work nicely but I cannot figure out how to change (set) the width of the lines. Please can you offer any advice?

thanks 

Reason: