opinions please: optimize long & short strategy separately?

Questions about MultiCharts .NET and user contributed studies.
hairyMug
Posts: 57
Joined: 03 Feb 2014
Has thanked: 5 times
Been thanked: 6 times

opinions please: optimize long & short strategy separately?

Postby hairyMug » 02 Oct 2014

If a strategy goes long and short, is it best to optimize separately then together?
Or all together at once?
I would like opinions please.

TIA, Walt

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: opinions please: optimize long & short strategy separate

Postby JoshM » 02 Oct 2014

If a strategy goes long and short, is it best to optimize separately then together?
Or all together at once?
I would personally optimise both sides of the strategy together. Otherwise, you can run into situations where profitable long trades were taken on bar 10, 20, and 30, but that don't show up in the combined strategy because it went short on bar 9, 19, and 29 (in the assumption that your short entries are not the exact opposite of long entries).

If you're deliberating to trade either the long or short side from this particular strategy, then I personally would optimize them separately and then decide which one is best.

hairyMug
Posts: 57
Joined: 03 Feb 2014
Has thanked: 5 times
Been thanked: 6 times

Re: opinions please: optimize long & short strategy separate

Postby hairyMug » 03 Oct 2014

Thank you Josh,
I would agree to do them together but then it seems either short or long is dependent on previous trade being on the correct side.( I would think)
I have just completed doing a long opt, then a short opt (each with it's own settings) and then a combined opt.
The combined opt results are less profitable than the results of the two separate opts.
I think this indicates that the two separate strats may "overlap" (i.e. one has not exited before the other starts).
From what I understand, using the "managed" mode of trading will not allow the overlap, as it will exit the current side upon entry to the other side.

Are you aware if it is possible to adjust some settings (or code) to allow for this overlap and thus become more profitable?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: opinions please: optimize long & short strategy separate

Postby JoshM » 11 Oct 2014

From what I understand, using the "managed" mode of trading will not allow the overlap, as it will exit the current side upon entry to the other side.

Are you aware if it is possible to adjust some settings (or code) to allow for this overlap and thus become more profitable?
With the `StrategyInfo.MarketPosition` property you can check the current position, and only send the order when there is no open position. In that case, managed entry orders will not close an already existing position.

But allowing overlap would require taking a long and short position simultaneously, which cannot be done in the same account and may not be allowed in separate accounts.

What you could try, however, is to see if you can identify situations where the long position has a higher chance of being profitable (and doing the same for shorts). When you know you have a promising long position (for example, already in a slight uptrend versus a sideways market) the strategy can be programmed to not take short trades at that point. That way the strategy can "favour" the promising trades, although the hard question is of course when do we know it's a promising trade. :)

hairyMug
Posts: 57
Joined: 03 Feb 2014
Has thanked: 5 times
Been thanked: 6 times

Re: opinions please: optimize long & short strategy separate

Postby hairyMug » 11 Oct 2014

Thanks for the reply, now if I only could get that crystal ball working. ;-)
Right now I'm using the portfolio trader, and adjusting the "BuyBestX" & "SellWorstY" to bias the sides based on the history of the trades and which are currently more profitable. Initial tests seem to show better returns, so I'm going down this path.
Have to say the "portfolio trader " distinguishes MC from other tools which can't handle something like this unless you get into some real heavy-duty coding...


Return to “MultiCharts .NET”