get the slope of a trendline

 
hi,

 how can I get the slope of a trendline



thanks
 
hongbin fei:
hi,

 how can I get the slope of a trendline



thanks
Simply, by drawing trend line(s) on the low prices & high prices (candle shadow)
 
Mohammad Soubra:
Simply, by drawing trend line(s) on the low prices & high prices (candle shadow)
slope?
 
hongbin fei how can I get the slope of a trendline
Change in price of the two end points divided by change in time of the two end points. Right click -> properties
 
whroeder1:
Change in price of the two end points divided by change in time of the two end points.
thanks!
 

EXAMPLE

 

 
Mohammad Soubra:

EXAMPLE

 

I want get the value by mql's code
 
hongbin fei:
I want get the value by mql's code

yes possible

by using this function:

bool  ObjectCreate(
   long          chart_id,      // chart ID
   string        object_name,   // object name
   ENUM_OBJECT   object_type,   // object type
   int           sub_window,    // window index
   datetime      time1,         // time of the first anchor point
   double        price1,        // price of the first anchor point
   ...
   datetime      timeN=0,       // time of the N-th anchor point
   double        priceN=0       // price of the N-th anchor point
   );

 something like:

            ObjectCreate("MS3_Line",OBJ_TREND,0,mopen,MS3,Time[0]+(Period()*60*30),MS3);

 

 

The above is MQL4 language (MT4) 

 
don't take me wrong but why do you need a slope for? I am just curious as an mathematician. 
 
Burhan Guvenc:
don't take me wrong but why do you need a slope for? I am just curious as an mathematician. 
I have a ea to draw trendline, if 2 line is same slope, then remove one
 
hongbin fei:
I have a ea to draw trendline, if 2 line is same slope, then remove one
Understood. That's interesting. Good luck
Reason: