Taking trendlines from ea and putting them into an indicator for optimisation.

 

I've recently figured out that you cannot use optimization with an ea that uses graphical objects on the charts such as trendlines, i was wondering if it's possible to put the trendlines into an indicator thats then called from the ea, will that work for optimization?

 
No, because there is no chart to draw on during optimization. Fix the EA to remember its status internally, not in objects.
Reason: