How to handle strategies that open multiple trades in SQ4
18 replies
Mark Fric
6 years ago #196945
I’d like to open a discussion about how to best implement scaling in SQ4 – meaning that strategy can open or close multiple trades into same direction.
It is mentioned here:
https://roadmap.strategyquant.com/tasks/sq4_0271
and
https://roadmap.strategyquant.com/tasks/sq4_0281
It is possible to have strategy that opens multiple positions in the same direction, the question is what methods to use to control that?
The ticket https://roadmap.strategyquant.com/tasks/sq4_0271 suggests that there should be some maximum number depending on a limit or open drawdown, but how to configure how often new trades should be opened?
Strategy probably shouldn’t open new position with every new bar.
I’m thinking about adding a condition on how often (meaning after how many bars) to open new position into the signal direction.
Are there some other ideas?
I’m not sue if this should be made configurable by program, or only possible using strategy templates – which gives you better control over how exactly you want the scaling to be implemented.
Mark
StrategyQuant architect
tnickel
6 years ago #197013
Hi Mark,
you can handle this in the following way.
a) Same direction signal
– open new Trade with fiexed lotsize if signal comes, (configure lotsize for every signal, define maximum lots )
b) oposite direction signal
– reduce lotsize if signal comes
I attached picture.
thomas
https://monitortool.jimdofree.com/
ybhx0315
6 years ago #197243
I don’t think it is a function that worth our effort.
I believe that opening multiple positions is equivalent to combining multiple simpler strategies with different entry rules. People who would like to trade that way are martingale gambler by nature.
mabi
6 years ago #197261
Maybe
1. Pullback bar pattern for continuation
2. Broken divergence
3. Retracement fiblevels.
4. Enter on stop x pip above previous x bar
5. Momentum above xx
6. Diffrent Combinations of all above.
tnickel
6 years ago #197273
Hi ybhx0315,
I don´t think so.
If you open at every signal a trade as example.
You get more trades with this ea. You can write some additional tools to filter out some signals.
It is easier to analyse this strategy.
thomas
https://monitortool.jimdofree.com/
Mark Fric
6 years ago #197276
thomas – thank you for the suggestion, now I know how it should work.
I also think it is an useful feature, definitely not a martingale (if it is used correctly). And its use will be optional.
Mark
StrategyQuant architect
afhampton
6 years ago #197282
Hi Mark
I would love to see the functionality in SQ4. There’s a model called “Zone Recovery Strategy” that I would like to try (covered in the video below) but have been unable to implement it so far. His model might give you an idea about how it could potentially function… or at least one of it’s uses.
https://www.youtube.com/watch?v=DJz4E7VyeSw&t=289s
Thanks for asking.
kleung88
6 years ago #197285
Hi Mark, I missed quite a number of messages. May I ask where I can download the SQ4 beta version to experience the preview please ?
Mark Fric
6 years ago #197288
all the info about Beta is here: https://strategyquant.com/betaversion4
Mark
StrategyQuant architect
6 years ago #197294
Hello Mark, How about to apply partial close concept?
Open multiple trades under certain condition, and close it partially with different conditions seperately.
I always thought about that the problem is exit rule, not the entry rule.
Malim
Malim
kleung88
6 years ago #197299
I found the download links, thanks !
mikeyc
5 years ago #235753
I don’t think it is a function that worth our effort. I believe that opening multiple positions is equivalent to combining multiple simpler strategies with different entry rules. People who would like to trade that way are martingale gambler by nature.
The issue is the Strategy Quant does not combine strategies and trying to easily combine them afterwards is complex.
Also if you think about it, combining multiple strategies is just a hard way of allowing multiple positions to be open at the same time, otherwise why do you need to create multiple strategies on the same instrument? Answer, because you want to open multiple positions!
Here’s some reasons why it is important:
https://www.moneyshow.com/articles/daytraders-27124/
https://www.investopedia.com/articles/trading/09/pyramid-trading.asp
I think it is better to add the feature to SQX. I would suggest the following rules for multiple positions:
- Only one trade is opened per signal. The entry signal must go false and then true again to trigger another entry. This is to prevent position after position from being opened.
- (As a default) Only if the overall trading position is in (open floating) profit should an additional order be placed. This is to prevent adding to losing trades, and only add to a winning position. This rule can be turned off in the build settings I would suggest.
- For exit rules, either the rule can close all open positions (default setting), or each exit signal closes one trade (either the most recent or the oldest first). Again the exit rule must go true and then false and then true again to trigger a closure where it is desired to close positions over time.
- There should be a limit to open trades. Either a fixed number (e.g. 5) or a total lot size or %. This will depend on the money management selected.
- There should be a setting to allow or disallow hedging (having opposing buy and sell orders open at the same time). I would suggest that by default, hedging is allowed, meaning long and short orders can be opened at the same time. If not enabled by a build setting, then long positions can only be opened if there are no short positions open, and vice versa.
I think this covers the most useful initial features that should be considered.
For individual trades, the usual considerations apply, SL and TP should be independently set at the time of order creation. Exit after X bars should apply per trade. Trailing stops should trail each open position independently. Move stop loss to BE should be per open position etc.
Thanks,
Mike
sbecm
5 years ago #236636
i would like to have functionality that add positions at a set interval.
for example add a new position at a atr interval
EntryPrice
EntryPrice + 1 * atr(1)
EntryPrice + 2 * atr(1)
or every 10 pips
so
EntryPrice
EntryPrice + 10 pips
EntryPrice + 20 pips
etc
tomas262
5 years ago #236658
mabi
5 years ago #236679
I could see this work together with an breakeven stop (+ pips) being placed. At least that used to work when trading manual . But then the break even stop should be re-calculated based on the new position or original stop being moved to cover original size stop.
Mz
1 year ago #278442
I have this setup – but how do I identify each position?
i.e. if only 1 position,I want to close first position at 1.09%,
Second position close position 1 and 2 at 1.021% from average entry price
if 3 positions, close etc…
How do I identify each position or calculate tp based on average entry price?
unfortunately as strategyquant doesn’t have take profit based on % nor average entry price – its getting a bit more complicated. In crypto, we only work with % not pips.