|
Category
Strategy Elements
Description
Imported trade list CSV field order specification (comma-separated list)
Choices
AssetId - the stock's Norgate asset ID (overrides Symbol if provided)
Symbol - the stock symbol
Underlying - the underlying symbol; treated as an alias for Symbol (useful for option or IB flex-query trade lists)
Strategy - the strategy name (if present, must match script strategy name)
Side - the round-trip trade side (long or 1 for long, short or -1 for short)
Action - the transaction type (BUY/SELL) and its presence identifies the file as a transaction list
DateTime - this field includes both date and time of a transaction, with a space between them
Shares - the quantity of a transaction or of both sides of a round-trip trade
DateIn - the date of a transaction or the entry date of a round-trip trade
TimeIn - the time of a transaction or the entry time of a round-trip trade
QtyIn - the quantity of a transaction or the entry quantity of a round-trip trade
PriceIn - the price of a transaction or the entry price of a round-trip trade
FeesIn - the commission/fees of a transaction or the entry fees of a round-trip trade
ValueIn - the EntryTradeValue if RealTest generated the trade list or any user-defined value
DateOut - the exit date of a round-trip trade
TimeOut - the exit time of a round-trip trade
QtyOut - the exit quantity of a round-trip trade
PriceOut - the exit price of a round-trip trade
FeesOut - the exit fees of a round-trip trade
ValueOut - the ExitTradeValue if RealTest generated the trade list or any user-defined value
Reason - a string of up to 80 characters describing the exit reason of the trade
TradeID - an optional numeric trade identifier stored with the trade (round-trip trade lists only)
Notes
The TLFields order does not need to be specified if the TradeList file's first row is a header using recognized field names (such as Symbol, DateIn, PriceIn); in that case RealTest auto-detects the column layout from that header. Specify TLFields explicitly when the file has no header row or uses non-standard column names.
If the CSV file includes a header row with column labels, these are simply ignored.
If TLFields includes Strategy, then only those trades where the contents of that column match the name of the strategy that contains the TLFields statement will be included. If TLFields does not include Strategy values, then all trades in the list will be used by this strategy.
Here is an example of how a TradeList strategy might look:
.png)
Note that the field names (like all names in RealTest) are not case-sensitive.
To ignore a column in a trade list file, add an extra comma to the field order list, as shown in the example above.
To ignore the first one or more columns, add extra comma(s) at the start of the list, e.g. ",,symbol,side," etc.
See Using an Imported Trade List for a detailed description of this mechanism.
|