RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language > Syntax Element Categories >

Strategy Elements

 

 

 

 

All the elements of a trading strategy definition.

Allocation - dollars allocated to this strategy

Ambiguity - assumption to use when sequence of entry/target/stop is unknowable

BarSize - strategy-specific timeframe

CalendarSym - symbol to use as the market date list for this strategy

CashInOut - daily deposit and/or withdrawal specification by formula

CashList - CSV file with list of specific deposit and/or withdrawal amounts

Category - position category value for use with MaxCatExp, MaxCatInv, and MaxSameCat

CloseSlip - slippage for at-close market transactions

Commission - commission per entry or exit transaction in dollars

Compounded - optionally overrides the automatically-determined S.Compounded setting

DebugEntry - log output from a running test at EntrySetup evaluation time

DebugExit - log output from a running test at ExitRule evaluation time

DebugTargetStop - log output from running a test at ExitLimit / ExitStop evaluation time

DynamicSizing - determines whether strategy operates in a special dynamic sizing mode

EntryLimit - price to use when entering a position with a limit order

EntryScore - ranking value for entry-time constraints (does not impact setup selection)

EntrySetup - true/false condition for whether a stock is a setup this period

EntrySkip - condition for whether to skip an entry (does not impact setup selection)

EntryStop - price to use when entering a position with a stop order

EntryTime - logical time of day at which positions are to be entered (typically next open)

EntryTradeValue - calculates a value to store in T.ValueIn item in the trade list record for this entry

ExitLimit - price to use when exiting a position with a limit order

ExitLimitQty - share or contract quantity for partial limit-price exits

ExitLimitTime - exit limit execution time

ExitQty - share or contract quantity for partial at-market exits

ExitRule - true/false condition for whether to exit a position

ExitStop - price to use when exiting a position with a stop order

ExitStopQty - share or contract quantity for partial stop-price exits

ExitStopTime - exit stop execution time

ExitTime - logical time of day at which positions are to be conditionally exited (typically next open)

ExitTradeValue - calculates a value to store in T.ValueOut item in the trade list record for this exit

FuturesMargin - dollar margin required to open a futures position

GreedyScoring - determines whether strategy uses a special variant of top-down setup selection

LimitExtra - extra excursion beyond a limit price required to assume order was filled

LimitSlip - slippage for at-limit-price transactions (typically 0)

MarkToMarket - whether strategy equity includes open-position mark-to-market value

MaxCatExp - maximum same-category percent investment

MaxCatInv - maximum same-category dollar investment

MaxEntries - maximum position entries to allow (rarely used)

MaxExposure - maximum percent investment

MaxInvested - maximum dollar investment

MaxLongExp - maximum long percent investment

MaxLongInv - maximum long dollar investment

MaxNetExp - maximum net long-short percent investment

MaxNetInv - maximum net long-short dollar investment

MaxNewExp - maximum new exposure per day

MaxNewInv - maximum new investment per day

MaxNewPos - maximum new positions per day

MaxPerTurn - how many setups per selection turn a strategy can add

MaxPositions - maximum open positions

MaxSameCat - maximum same-category position count

MaxSameSym - maximum same-symbol position count

MaxSetups - maximum entry setups per day

MaxShortExp - maximum short percent investment

MaxShortInv - maximum short dollar investment

MaxSymExp - maximum same symbol percent investment

MaxSymInv - maximum same-symbol dollar investment

MinFreeCash - minimum free cash in the account

MinNetExp - minimum net long-short percent investment

MinNetInv - minimum net long-short dollar investment

OpenSlip - slippage  for at-open market transactions

OrderMktAsLmtPct - allows generated market orders to optionally be converted to limit orders

OrderNote - string to add to the text of each order and as the "note" value in CSV order lists

OrdersFile - path/name a strategy-specific order list file to generate

OrdersTemplate - path/name a strategy-specific orders template file

PriceRound - order and trade price rounding interval

QtyFinal - can be used to modify the quantity of an entry after top-down setup ranking has been done

QtyPrice - which price (order vs. fill) to use when calculating Quantity, trade fraction, and exposure

QtyRound - position size rounding interval

QtyType - position size formula unit type

Quantity - position size to enter as shares, value, or percent depending on QtyType

Reduce - whether to reduce position size rather than skip the entry due to capacity constraints

RollCost - total cost of each roll transaction while holding a futures position

SetupScore - ranking factor value used to prioritize entry setup selection

SetupSkip - entry setup skip condition

Side - strategy side constant

Slippage - general-purpose slippage (price points)

StopSlip - slippage for at-stop-price transactions

StrategyScore - ranking factor value for strategies at each turn of top-down setup selection

TLAdjusted - whether quantities and prices in an imported trade list are split-adjusted

TLDateFmt - whether dates in an imported trade list are DMY or MDY

TLFields - defines the column layout of an imported trade list CSV file

TLIgnoreRules - whether strategy formulas are ignored in Test mode trade list playback

TLStratName - strategy name within tradelist that maps to this script strategy

TLTimeShift - number of hours to add or subtract to trade list entry dates/times

TradeList - imported trade list file (CSV format)

Using - strategy/benchmark/template to inherit from

 

 

 

Copyright © 2020-2024 Systematic Solutions, LLC