A function that will return the name of the nearest passing line?

 

On my EA, there is a part I called TP_calc()

This part looks for the nearest probable TP to slice a long trade to parts.

There are some constant TP point, like various eMAs and all the R(1,2,3) and S(1,2,3) of the pivot indicator but I want to add some more.
For that, I need to "see" what is the name, type and value of the line (horizontal or trend_line) above or below the current bid position.

So basically I need a function that will return the name of the nearest line passing above or below my current position.

Is there a way to do that?

James
Reason: