Category
Strategy Elements
Description
Open position investment limit for a strategy or group of strategies
Input
Any formula specifying a dollar amount
Notes
MaxInvested is one of the Capacity Constraints formulas used in the setup selection process.
The Investment of a position is its share quantity times its entry price.
A setup is only selected if its investment value, when added to those of currently open positions and previously selected setups, would not exceed the value returned by this formula.
If a setup cannot be selected due to this constraint and the strategy specifies Reduce: True, then the position's Quantity will be reduced to allow the position to be ordered for entry at smaller size if possible.
Setups skipped for this reason display "max invested" in the Reason column of the Trade List, provided that the KeepTrades setting included Skipped.
If MaxInvested is not specified then there is no limit placed on the dollar investment level, though there might still be investment limits if the strategy specifies MaxExposure and/or MaxPositions.
To cap investment at the strategy's current allocation, use MaxInvested: S.Alloc.
See Also: Backtest Engine Details and Capacity Constraints
When using Legacy Mode:
•MaxInvested is checked at position entry time rather than setup selection time
•EntryScore is used to determine which entries got priority
•MaxInvested cannot be used in Combined or StatsGroup
|