Position Options

Modified on 2017/09/12 19:24 by Eugene — Categorized as: PosSizers

This PosSizer extends the capabilities of the standard position sizing methods, adding some requested options. As with most other PosSizers, define the basic position size as either fixed dollar, percent of equity, or maximum risk percent, and then see the effect of various applied rules.

Each option has a checkbox on the right that either enables or disables it. Options can be freely combined with each other. You have the following possibilities:


The "Skipped trade solution" is somewhat similar to the so called "Position Leeway" option in discontinued Wealth-Lab 4 that allowed to include trades if there is insufficient capital. When using 100% of equity sizing, skipped trades due to insufficient capital can be caused by the gap between the basis price and the actual price. For the whys and wherefores of basis price, see the User Guide > Strategy Window > Backtesting Strategies > 100% of Equity Sizing.


Note: trades may still be skipped at 100%; to avoid this, reduce the desired percent equity according to your estimated commission + slippage as a percentage of size (e.g. 100% sizing - 0.05% slippage - 0.05% commission, so final size = 99.9%).

Related option For last position, use all what's left which can be engaged after pressing the "Max Open Positions" button, allows to eliminate more skipped trades in cash-limited situations. It does so by investing all available cash for trade N+1 when you already have N open positions. For example: you are sizing positions at 10% equity, you have 9 open positions, there is not enough equity to take the 10th signal - this option takes the final signal, sizing the Alert using all the cash left.

The "Use .Tag" button, when enabled, allows to define the Percent-Equity or Max % Risk input programmatically i.e. in your Strategy: for instance, according to some technical or fundamental event. The combo box switches the position sizing from percent equity to max % risk. You have two options for passing the percent as a double value to the PosSizer:

  1. Either in the LastPosition.Tag property
  2. Or, if your Strategy employs .Tag for its own purposes, as the parameter of the SetShareSize method. For this to work, together with Use .Tag you should click on the Use SetShareSize button on the left.

Image

Example

This code snippet demonstrates how to assign a Position.Tag value to use a different % equity sizing depending on stock symbol:


if( BuyAtStop( bar+1, Highest.Series( High,20 )[bar] ) != null )
{
	string symbol = Bars.Symbol;
	LastPosition.Tag = 
		(symbol == "AAPL") ? 20.0 : 	// 20% equity for Apple
		(symbol == "MSFT") ? 10.0 :	// 10% equity for Microsoft
		5.0;				// or 5% for anything else
}

Notes and Limitations