Navigation: Realtest Script Language > Syntax Element Details >







Strategy Elements


Open position exposure limit for a strategy or group of strategies


Any formula specifying a percentage


MaxExposure is one of the Capacity Constraints formulas used in the setup selection process.

The Exposure of a position is 100 times the initial dollar value (cost) of the position (based on order price) divided by the strategy's S.Alloc value.

A setup is only selected if its exposure, 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 exposure" in the Reason column of the Trade List, provided that the KeepTrades setting included Skipped.

If MaxExposure is not specified then there is no limit placed on the percent exposure, though there might still be investment limits if the strategy specifies MaxInvested and/or MaxPositions.

To cap exposure at 100% (e.g. 20 positions at 5% each), use MaxExposure: 100, and so on.

Note that opening gaps beyond a specified order price may cause actual exposure to exceed the specified cap in some situations -- think of this constraint as "maximum intended exposure".

See Also: Backtest Engine Details and Capacity Constraints

When using Legacy Mode:

MaxExposure is checked at position entry time rather than setup selection time

EntryScore is used to determine which entries got priority

MaxExposure cannot be used in Combined or StatsGroup




Copyright © 2020-2024 Systematic Solutions, LLC