Limiting the number of open positions across strategies in SM
Author: stephenlobo2963
Creation Date: 3/8/2018 9:43 PM
profile picture


I'm running a strategy where I get signals based on a combination of conditions. In back-testing I've limited the number of open positions by using "Percent of equity" which restricts the number of open trades at any given time.

In the live scenario this setting is not available for Raw Profit mode which is recommended for live trading.

Is there any way to limit the number of open positions ? Any thoughts, ideas or workarounds will be sincerely appreciated.

profile picture


Stephen, Raw Profit mode inherently accepts all signals by design. But I think it might be possible to overcome if you rewrite your Strategy in a special way. Here's the deal.

Wealth-Lab runs a multi-symbol backtest in Portfolio Simulation mode like this: execute Strategy on each symbol of the DataSet in alphabetical order + apply position sizing / portfolio constraints. You can take the control required by rewriting your Strategy to run on single symbol like any portfolio rotation strategy does.

This means to loop by DataSetSymbols (SetContext, run a loop by bars, RestoreContext...) to generate your signals. This way you can halt processing new signals when necessary. Once done, set up the Strategy in the SM to run on any symbol of DataSet (e.g. the first).
profile picture


Okie. Tks.