How get angle or slope of trendline?

 
How get angle or slope of trendline?
 
gouki1001:
How get angle or slope of trendline?

Is there a way to use time stamps like points or integers so I can use them in simple math calculations?

 

In mt4  Draw trendline by angle  tool do it

t

 
gouki1001:
How get angle or slope of trendline?

the slope is in point per Bar

 
  1. gouki1001: How get angle or slope of trendline?

    Angle can't be done.

  2. gouki1001: Is there a way to use time stamps like points or integers so I can use them in simple math calculations?
    iBarShift


 
William Roeder:
  1. Angle can't be done.

  2. iBarShift


I have get my values from Y axis values like this Low[L1] /(Low[L2]/High[H1] /High[H2]



llhypl = MathSqrt(MathPow((iBarShift(NULL,0,Time[Low[L1]])- ( iBarShift(NULL, 0, Time[Low[L2]]))),2)+ MathPow(((Low[L1]-Low[L2])*100000),2));


So i get an error when I try to get  values into the iBarShift function.

 
gouki1001:
Time[Low[L1]]
iBarShift(NULL, 0, Time[Low[L2]]
  1. Babel. If L1 is an index, Low[L1] is a price of bar L1. What is the time of a price? Meaningless.

  2. If you meant Time[L2], the shift of Time[L2] is L2. Babel.

  3. When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your (original) post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

Reason: