Drawing Shapes/Objects using the Canvas Class

 

Folks!

I looked at the Canvas class to use its power for simplified drawing of shapes and objects. However, I am struggling to create any visible shape. I searched through the forum and found this post:

https://www.mql5.com/en/forum/216195

This looks like a very basic example so I gave it a try. However, as the author himself, I wasn't able to see any shapes drawn into the graph.

What's the issue here?!

Cheerio!

Help on simple CCanvas example
Help on simple CCanvas example
  • 2017.09.24
  • www.mql5.com
Hello! mql5 is still a bit of a mystery to me...
 

Please read documentation :

Create

Creates a graphical resource without binding to a chart object


You need to use CreateBitmap() or CreateBitmapLabel().

Documentation on MQL5: Standard Library / Custom Graphics / CCanvas
Documentation on MQL5: Standard Library / Custom Graphics / CCanvas
  • www.mql5.com
Standard Library / Custom Graphics / CCanvas - Reference on algorithmic/automated trading language for MetaTrader 5
 

Thank you Alain for getting back to me! 

How do I then connect/attach the bitmap file to the object itself?


However, I can still not see why the circle (oone of the primitives) is not drawn?


Cheerio!