An EA that backtest itself??

 

Hi,
I'm not sure if anyone has asked this question before. If they have please link me to the specified thread/post/site and you can delete this post and I apologize for not looking hard enough. I've tried searching the web but to no avail.

My question is, is it possible to have an EA backtest itself, all by itself? Then using the results from the backtest to optimize its setting for profitable trades?

For example, it will backtest the indicator DeMarker and find the best parameter that works with the current ticks. Then using that parameter (say 76) to trade.

I believe this might be a custom indicator.

Thank you for your time and for this forum =).