Navigation: Realtest Script Language > Syntax Element Details >

QtyType

 

 

 

 

Category

Strategy Elements

Description

Specifies how to interpret the Quantity formula

Choices

Shares - Quantity represents the number of shares or contracts (default if not specified)

Value - Quantity represents the notional value of the position (e.g. dollars)

ValueClose - Same as Value but uses previous close rather than entry fill price to calculate

Percent - Quantity represents the percentage of allocation

PercentClose - Same as Percent but uses previous close rather than entry fill price to calculate

Notes

The following are all equal position sizes, based on entry fill price:

The following are all equal position sizes, based on previous close price:

As a general rule, basing Quantity on FillPrice implies an ability to place orders using realtime market data to calculate the number of shares based on the most likely fill price as of that moment (for example, after a gap opening). If you are placing your orders before the market has opened, then it is more realistic to use previous-close-based Quantity calculations.

For strategies that enter using EntryLimit and/or EntryStop, with orders placed in advance, the recommended approach is:

 

 

 

 

 

Copyright © 2020-2022 Systematic Solutions, LLC