Trade Properties

Top  Previous  Next

These properties give you the details of all closed trades for the test

 

Trade Indexing

Properties listed with a '[ ]' following them may be indexed using a number which determines the trade starting with the last trade and working backward in time. If no index is supplied the property will return the information for the last trade.

 

lastTradeProfit = test.tradeProfit[ 1 ]

 

or

 

lastTradeProfit = test.tradeProfit

 

will access the last trade's profit for this test.

 

Trade Properties

 

 

 

tradeCount

 

the number of prior trades including zero size trades. Used to index the following properties:

 

 

 

tradeSymbol[ ]

 

the symbol for the instrument for this trade

tradeEntryDate[ ]

 

the entry date

tradeEntryTime[ ]

 

the entry time

tradeEntryFill[ ]

 

the entry fill price

tradeEntryOrder[ ]

 

the entry order price

tradeEntryBPV[ ]

 

the entry bpv of the instrument

tradeQuantity[ ]

 

the quantity in shares or contracts

tradeExitDate[ ]

 

the exit date

tradeExitTime[ ]

 

the exit time

tradeExitFill[ ]

 

the exit fill price

tradeExitOrder[ ]

 

the exit order price

tradeDaysInTrade[ ]

 

the number of days between entry and exit (includes weekends and holidays)

tradeBarsInTrade[ ]

 

the number of bars between entry and exit

tradeProfit[ ]

 

the closed out profit including slippage and commission

tradeDirection[ ]

 

the direction (LONG or SHORT)

tradeRuleLabel[ ]

 

the rule label as set through scripting

tradeCustomValue[ ]

 

the custom value as set through scripting

tradeEntryStop[ ]


the initial entry day stop, if used

tradeProfitPercent[ ]


the profit as a percent of entry day trading equity

tradeSystem[ ]


the system index for the trade

tradeUnitNumber[ ]


the unit number for the trade

tradeEntryRisk[ ]


the entry risk as a percent of entry day trading equity

tradeDollarsPerPoint[ ]


the dollars per point on the entry day

tradeMaxFavorableExcursion[ ]


the maximum favorable excursion of the trade

tradeMaxAdverseExcursion[ ]


the maximum adverse excursion of the trade

tradeMinFavorableExcursion[ ]


the minimum favorable excursion of the trade

 

 

averageTradeDuration


the average trade duration of all trades in the test, computed using the tradeDaysInTrade property