Libraries: Easy Canvas - page 18

 
Peter Vorobyev OBJ_RECTANGLE type. It is necessary in order to visually beautifully display the overlapping of rectangles (i.e. the presence of transparency).
Perhaps there is an example of such use?

There is an example of rendering of figures bound to candles in a book.

Учебник по MQL5: Расширенные средства языка / Ресурсы / Прикладное применение графических ресурсов в трейдинге
Учебник по MQL5: Расширенные средства языка / Ресурсы / Прикладное применение графических ресурсов в трейдинге
  • www.mql5.com
Расширенные средства языка - Программирование на MQL5 для трейдеров - Учебник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Stanislav Korotky #:

There is an example of rendering candlestick bound figures in the book.

It is better not to use these examples. They use ChartXYToTimePrice, ChartTimePriceToXY functions, the use of which leads to very strong lags. They work tens of thousands of times slower than they should. This is a very old MQ symantic bug that they will not fix.
In this library this problem is solved if you use the following functions:

   double            X(double bar){return((double)W.Left_bar-bar)*W.dx_pix;}; //The X coordinate by the bar number. The bar number must be of type double, otherwise, the bar will be interpreted as time.
   double            X(datetime Time);                                        //The X coordinate by the time.
   double            Y(double Price) {if(W.dy_pix==0) W.dy_pix=1; return((W.Y_max-Price)/W.dy_pix); }; //The Y coordinate by the price.
   double            Price(int y)     {return (W.Y_max-y*(W.Y_max-W.Y_min)/W.Height);};       // Price by the Y
   double            Bar(int x) {return((double)W.Left_bar+1-(double)x/(double)W.dx_pix);};   // bar number by coordinate X 
   datetime          TimePos(int x);
 
Nikolai Semko #:
Already updated and attached in previous post

Thanks. I didn't realise at first that iCanvas_CB__1.mqh is iCanvas.mqh v1.54.

 
mqh com algum erro na inicialiação
 
Nikolai Semko #:
Already updated it and attached it in the previous post

Nikolay, what is the current version of the library for MT4. And where it can be downloaded.

The link at the beginning of the topic downloads version 1.47

And in the discussions above it is version 1.54. But, I understand, it is for MT5

 
Eugeni Neumoin #:

Nikolay, what is the current version of the library for MT4. And where it can be downloaded.

The link at the beginning of the topic downloads version 1.47

And in the discussions above is version 1.54. But, I understand, it is for MT5

Yes, the actual version for MT4 is 1.47
I have given up MT4. I don't do anything for MT4 anymore. What I do now for MT5 is simply impossible to do for MT4. First of all, because of limited quote data and lack of tick history. Product sales are also falling for MT4, although a few years ago there was parity with MT5.

 
Nikolai Semko #:

Yes, the current version for MT4 is 1.47
I have given up MT4. I don't do anything for MT4 anymore. What I do now for MT5 is simply impossible to do for MT4. First of all, because of limited quote data and lack of tick history. Product sales are also falling for MT4, although a few years ago there was parity with MT5.

I have a promising topic for MT4 so far. I need to finalise it. And this process may take up to a year. I have to make the technical task and its implementation mostly by myself.

I have never worked with Expert Advisors before. I have not seen any promising ideas. Only indicators. But here interesting ideas started to appear.

Translation to MT5 will not be difficult.

Now there are tasks in which I don't see a better tool than kanvas. But these are small tasks. Unfortunately, not everything can be solved with mql.

 
Eugeni Neumoin #:

I have a promising topic for MT4 so far. I need to finish it. And this process may take up to a year. And maybe even more. I mostly have to draw up the technical task and its implementation myself.

I have never worked with Expert Advisors before. I have not seen any promising ideas. Only indicators. But here interesting ideas started to appear.

Translation to MT5 will not be difficult.

Now there are tasks in which I don't see a better tool than kanvas. But these are small tasks. Unfortunately, not everything can be solved with mql.

Fortunately, kanvas is present everywhere, in all modern languages.
Here's a look at what you can do on kanvas in the browser:
https://www.egui.rs/
No html and css, only kanvas. And the performance is much better.


 

Love this one, made some modifications and now its saved in my default template on all charts..
Its showing all candles as two values, so Open value is changeing on the candle depending on where you are with the mouse..

Thanks..

 
skrantz71 #:

Love this one, made some modifications and now its saved in my default template on all charts..
Its showing all candles as two values, so Open value is changeing on the candle depending on where you are with the mouse..

Thanks..

No problem
Thank you
Last version 1.55

Files:
iCanvas_CB.mqh  74 kb