How to call this type of indicators in our program ? maybe there is no solution for this!!

 
Hello great coders, i met a rare problem in my program needing your help:
i have my EA, and want to add to him a trendline property using another indicator called "TL_by_Demark_v6" its great indicator searches in the last 25 bars for peaks and troughs in separate cycles,
- if the last peak on the chart is lower than the previous, it draw a falling trendline between them.
- if the last trough on the chart is higher than the previous, it draw a rising trendline between them .
It draw tow trendlines in the same time,one falling and the other rising . To detect the last case of the market falling or rising (it is the most important thing in the indicator):
- if the time of the bar of the last peak is more than the time of the bar of the last trough then the last case is falling trend, and it draw the falling trend line part
of the last 10 bars in thick red line and the previous part of the line is a thin dotted line.
- if the time of the bar of the last peak is less than the time of the bar of the last trough then the last case is rising trend, and it draw the rising trend line part
of the last 10 bars in thick lime line and the previous part of the line is a thin dotted line.

the problem that faces me is that i want to use the last case trending only in my program, i tried to use the iCustom function but it passes the values of the trendlines on the chart only, and this is useless values, i want my program to know the last case of trending in the indicator, is there any solution to that ?
could i by anyway call the color property of the line maybe for example, or similar aides.
the indicator from here https://www.mql5.com/en/articles/1507
The indicator is attached.
Files:
Reason: