Evaluate and objective are for evaluating results. Indicators and price series are released at session end.

TA-Lib indicators work anyway only with series according to the manual, I guess you cannot use them with arbitrary data. You can see in the manual or in the functions.h list which functions are from the TA-Lib.

For regression use the polyfit function. LinearRegSlope is a TA-Lib indicator and not for general statistics.

If you need indicator returns in evaluate for some reason then get them while the session is still running, for instance in the EXITRUN.