Navigation: Realtest Script Language > Syntax Element Details >







Strategy Elements


Can be used to modify entry position sizes after top-down setup selection has been completed


The initial desired Quantity of each setup must be specified prior to application of constraints such as MaxExposure or MaxInvested.

The final count of setups that can become orders is therefore not known yet when initial quantities are set.

QtyFinal is provided for cases where you want position sizes to be influenced by the number of orders that will be placed after constraints have been applied.

An example use case might be:

This sets the initial position sizes to 10%.

After selecting today's setups while applying the MaxExposure constraint, positions are resized to use all remaining capital divided equally among the new orders to be placed (S.EntryOrders).

(Arbitrarily growing position sizes to use available exposure may increase position-specific risk and is probably not advisable, but if you wanted to test it, this would be a way to do so.)

See Also: Backtest Engine Details and Capacity Constraints




Copyright © 2020-2024 Systematic Solutions, LLC