Objective function for optimization

 

After using MetaTrader for optimization of trading strategies for a few months I am not happy with it for a variety of reasons and thinking about writing my own tester/optimizer in Matlab and one of the most difficult questions I am facing is: what should the objective function look like? I have identified at least three parameters I would like to include into the objective function (fixed lot trading, no money management):

1) Maximum slope of the linear regression line of the equity curve (want equity curve to be as steep as possible)

2) Minimum sum of squared residuals of the linear regression line of the equity curve (want equity curve to be as linear as possible)

3) Maximum number of trades (want to trade as often as possible while not scalping)

However I am not sure what is the best way to combine them together to form the objective function for the optimizer. Should it be something like

(slope of linear regression) * (number of trades) / (sum of squared residuals) or some other combination of exp(), ^x, log() of these parameters (no Sharpe ratio please).

Should other parameters be included?

If anyone has experience developing objective functions for trading systems and feels like sharing it I would greatly appreciate your feedback.


 

I was thinking about doing the same thing. did you write your tester on matlab? can you give me a short description?