Category
Strategy Elements
Description
Specifies how to round trade prices in backtests and order lists
Input
Any formula specifying a rounding interval (step value)
Notes
If not specified, the default rounding interval is the TickSize of the symbol.
PriceRound: 0.01 means round to the nearest penny (which is also the default TickSize if not known)
PriceRound: 0 means don't do any rounding (include all available decimal places).
PriceRound: if(C < 1, 0.0001, 0.01) means round to nearest penny for stocks above $1/share or nearest hundredth of a penny for penny stocks
Prices are rounded before being used to calculate trade profits/losses, which makes those figures more realistic.
Since RealTest always uses split-unadjusted (as-traded) prices in formulas, we do not need to worry about the extra decimal places that might be required for a past date of a stock that later had one or more splits. Prices by default are rounded to the as-traded TickSize.
Unless you have a specific need to control trade price rounding, it is recommended to NOT include this element in your Strategy definitions, so that the default (TickSize) rounding will be applied.
|