How draw Line

To add comments, please log in or register
RenatoMasias
48
RenatoMasias  

Hello good day, i am trying draw line in the windows chart with the class CCanvas, want connect two points for one line, how follow:


CCanvas        miLineaUp;

atrhighVal[2]=maVal[2]+atrVal[2]*2.5;   // EMA(21) + ATR(14)*2.5

atrhighVal[1]=maVal[1]+atrVal[1]*2.5;   // EMA(21) + ATR(14)*2.5

y1=atrhighVal[2];    //previous value

y2=atrhighVal[1];   //actual value

miLineaUp.Line(x1, y1, x2, y2, clrAzure);


but the values of x1 and x2 are times? how i put these values,

thanks

Renato

FXreedom
1947
FXreedom  
RenatoMasias:

Hello good day, i am trying draw line in the windows chart with the class CCanvas, want connect two points for one line, how follow:


CCanvas        miLineaUp;

atrhighVal[2]=maVal[2]+atrVal[2]*2.5;   // EMA(21) + ATR(14)*2.5

atrhighVal[1]=maVal[1]+atrVal[1]*2.5;   // EMA(21) + ATR(14)*2.5

y1=atrhighVal[2];    //previous value

y2=atrhighVal[1];   //actual value

miLineaUp.Line(x1, y1, x2, y2, clrAzure);


but the values of x1 and x2 are times? how i put these values,

thanks

Renato


https://www.mql5.com/en/articles/1503

MQL4 Language for Newbies. Custom Indicators (Part 2)
MQL4 Language for Newbies. Custom Indicators (Part 2)
  • www.mql5.com
This is the fifth article from the series "MQL4 Languages for Newbies". Today we will learn to use graphical objects - a very powerful development tool that allows to widen substantially possibilities of using indicators. Besides, they can be used in scripts and Expert Advisors. We will learn to create objects, change their parameters, check...
To add comments, please log in or register