- Optimize for Sharpe ratio (not for gains);
- Optimize your weak spots according to price history (not your strong gains).
The reasons are very simple. When optimizing your result for Sharpe ratio, you'll find steady gains. Steady wins over rush-pullback in the long run. The weak spots are what kill you in margin trading. Optimizing these ensure you don't get rekt.
The optimizing pseudo code goes something like this:
With this you can't possibly go wrong. And can that quantum trading idea you heard about - this is a gazillion times better!