
3516 
richo: Hi Is there any formula for finding whether two trend lines are parallel? I am finding the slope of first trend line and matching with the other, but it is not accurate. Any other guidelines please. Thanks. richo.
Find the TL that spans the shortest length of time, find the difference in price between the start and the end, Check that the other trendline moves bythr same amount pricewise in the same timespan. Then they are parallel. But I think that you would have to allow a bit of margin. 

GumRai:
Find the TL that spans the shortest length of time, find the difference in price between the start and the end, Check that the other trendline moves bythr same amount pricewise in the same timespan. Then they are parallel. But I think that you would have to allow a bit of margin.
Thanks. I am working on it, as you said we have to allow deviation plus or minus some points. 

richo: Is there any formula for finding whether two trend lines are parallel? I am finding the slope of first trend line and matching with the other, but it is not accurate. Not "accurate" because you can't compare doubles for equality The == operand.  MQL4 forumdouble slope1 = ..., slope2 = ..., epsilon = MathMax( MathAbs(slope1), MathAbs(slope2) ) * 0.001; bool parallel = MathAbs(slope1  slope2) < epsilon; 


I think is bettter ... follow: //++ // right comparison of 2 doubles  //++ // normalize difference between expression1 : expression2 : expression..n double true_diff = (expression1==expression2)?0:(expression1expression 2)/(expression2expression1); I wrong ?! .... Thanks ! 
Hi
Is there any formula for finding whether two trend lines are parallel? I am finding the slope of first trend line and matching with the other, but it is not accurate.
Any other guidelines please.
Thanks.
richo.