how to convert two parallel line OBJ_TREND to one OBJ_PITCHFORK

 

how can I convert two parallel line OBJ_TREND to one OBJ_PITCHFORK

  hi every one,new to coding try to learn ,got this question if any one can please answer me thank you in advance .


ObjectCreate(name+" UP",   OBJ_TREND, 0, x2,(y2+Point*Kanals[i][7]),x1,(y1+Point*Kanals[i][7]));

ObjectCreate(name+" DOWN", OBJ_TREND, 0, x2,(y2+Point*Kanals[i][8]),x1,(y1+Point*Kanals[i][8]));

 

the above code creat two parallel TREND line, now the qustion is how I use the above information to create a PITCHFORK which use the up trend line as the PITCHFORK  up parallel line and  the DOWN trend line as the PITCHFORK  DOWN parallel line?

AS show in chart : point A,B given by  x2,(y2+Point*Kanals[i][7]),x1,(y1+Point*Kanals[i][7]) to create trend line AB;

point C,D given by  x2,(y2+Point*Kanals[i][8]),x1,(y1+Point*Kanals[i][8]) to create trend line CD;



 now I need to work out coordinator for point G 


ObjectCreate(name,OBJ_PITCHFORK,sub_window,time1,price1,time2,price2,time3,price3)
would be like that 

ObjectCreate(name,OBJ_PITCHFORK,0,point G,point A,point C)