draw Line

 

Good day, How can i use the function Line, It is in clase CCanvas.

For use this call a library 

#include <Canvas\Canvas.mqh>

after i give name a objet

CCanvas  miLinea;

For draw adk the follow parameters (x1, y1, x2, y2, color) all integers. know what  x1, x2 are times and y1, y2 are prices, how i use this? i have use severeal form without results.

miLinea.Line(x1, y1, x2, y2, color);

thanks

 
RenatoMasias:

Good day, How can i use the function Line, It is in clase CCanvas.

For use this call a library 

#include <Canvas\Canvas.mqh>

after i give name a objet

CCanvas  miLinea;

For draw adk the follow parameters (x1, y1, x2, y2, color) all integers. know what  x1, x2 are times and y1, y2 are prices, how i use this? i have use severeal form without results.

miLinea.Line(x1, y1, x2, y2, color);

thanks


#include <Canvas\iCanvas.mqh> //https://www.mql5.com/ru/code/22164  - MQL5
                              //https://www.mql5.com/en/code/23840  - MQL4
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
    Canvas.Erase(0);
    Canvas.Line(100,100,1000,500,ColorToARGB(clrAqua)); 
    Canvas.Update();

Sleep(10000);
  }
Reason: