Parent: Object
Represents the position sizing that was established for a backtest.
The amount of the position sizing method. Represents different things depending on how the PositionSizeType property is set.
The margin factor to use for the backtest.
The maximum number of open positions to allow at one time during the backtest, or zero for no limit.
The maximum number of open positions per symbol to allow at one time during the backtest, or zero for no limit.
The maximum number of open long positions to allow at one time during the backtest, or zero for no limit.
The maximum number of open short positions to allow at one time during the backtest, or zero for no limit.
Contains the instance of the PositionSizer selected, if PositionSizeType is equal to PosSizer.
The position sizing method employed. Possible values for the PositionSizeType
enum are:
- Dollar - a fixed currency amount
- Quantity - a fixed number of shares/contracts
- PctOfEquity - a percentage of the current simulated equity
- MaxRiskPct - risks a percentage of the current simulated equity based on a risk stop level (see
GetMaxRiskStopLevel
); - PosSizer - use a PositionSizer instance for more advanced position sizing
The backtest starting capital.
Determines how the cost basis of a simulated trade is established. If false (which is the default value), the cost basis of a Transaction is established using the closing price of the entry bar. If the market gaps up the following day, it's possible that trades could be missed and result in NSF status (non-sufficient funds). If set to true, the cost basis of a Transaction is based on the open price of the next bar. This avoid the problem of the market gapping up and potentially missing simulated trades, but assumes that the executing broker allows orders to be specified in dollar (currency) values rather than shares/contracts.