How do draw a parallel line

 

How do draw a parallel line

 
drbastem:
How do draw a parallel line

Do the following :

//

//

// first line

//

//

ObjectCreate(chart_ID,name1,OBJ_TRENDBYANGLE,sub_window,time,price1,0,0);

ObjectSetDouble(chart_ID,name1,OBJPROP_ANGLE,angle);

//

//

// second line

//

//

ObjectCreate(chart_ID,name2,OBJ_TRENDBYANGLE,sub_window,time,price1,0,0);

ObjectSetDouble(chart_ID,name2,OBJPROP_ANGLE,angle);

 
drbastem:
How do draw a parallel line

All you need to do to draw a parallel line is double click the original line and while holding down Ctrl on your keyboard drag the original line with the mouse and a second line parallel to the original appears.

 
mladen:
Do the following :

//

//

// first line

//

//

ObjectCreate(chart_ID,name1,OBJ_TRENDBYANGLE,sub_window,time,price1,0,0);

ObjectSetDouble(chart_ID,name1,OBJPROP_ANGLE,angle);

//

//

// second line

//

//

ObjectCreate(chart_ID,name2,OBJ_TRENDBYANGLE,sub_window,time,price1,0,0);

ObjectSetDouble(chart_ID,name2,OBJPROP_ANGLE,angle);

Two Lower Fractal Drawline is not problems. How do One Upper Fractall drawline paralle (two Lowers Fractal).

How do calculate Angel ?

 
cja:
All you need to do to draw a parallel line is double click the original line and while holding down Ctrl on your keyboard drag the original line with the mouse and a second line parallel to the original appears.

i wanto to mq4 code

 
drbastem:
i wanto to mq4 code

That is mql 4 code

 

______________________

 
drbastem:
______________________

For a start, you can check here : https://www.mql5.com/en/forum/172969

Also, you might want to check this thread : https://www.mql5.com/en/forum/173009

The rest is up to you (the what price and time to use and the how to use them and what angle you wish)

______________

But the easiest way is to use a linear regression channel and you will not have to do any of the stuff (like calculating angle, which is imposible using financial time series) and you shall always have a perfectly fitted channel made of parallel lines

 

Time3 point should be parallel to the Time point. What ic calculate Time4 and Price4 Point.

 
drbastem:
Time3 point should be parallel to the Time point. What ic calculate Time4 and Price4 Point.

drbastem

Some problems :

1. how would you calculate the "angle"

2. angle in financial time series is meaningless (you can not use price changes and time changes to calculate "angle" - they are completely incompatible)

Reason: