This PosSizer lets you adjust the percentage of equity in relation to priority magnitude.
By default, Wealth-Lab assigns a random double value, ranging from 0 to 1, as a position's priority. It's possible to assign a custom priority value to a Position in Strategy code via the
Position.Priority property. This easily allows to control the position sizing for the various signals.
Example use cases
- Assign 10% to a position on condition A (priority = 1) and assign 20% to a position on condition B (priority = 2)
- Easily test a "Double and Reverse on a Stop Loss" system by assigning a different priority and position size to the entry signal coming after a loss
- Assign different equity percentages based on market sectors, ETF groups etc.
Setting up
On this example, only trades with random assigned priorities ranging between 0.4-0.49 and 0.7-0.79 are taken, as shown by the
Trades+ visualizer in the background. Although priorities from 0.8 to 1.0 are processed, these trades are sized to 0% per position so they aren't included).
The series of checkboxes define the number of active priority "groups" (bins). Unchecking them:
- allows to have any number of Priority groups from 1 to 10,
- makes trades with such priorities assigned disappear.