Closed trade information is available by accessing any of the historical trade information.
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 = instrument.tradeProfit[ 1 ]
OR
lastTradeProfit = instrument.tradeProfit
will access the last trade's profit for this instrument.
Historical Trade Properties: |
Descriptions: |
---|---|
tradeBarsInTrade[ ] |
the bars in the trade |
tradeCommission[ ] |
|
tradeCount |
the number of prior trades including zero size trades. Used to index the following properties: |
tradeCustomValue[ ] |
the custom value as set through scripting |
tradeDaysInTrade[ ] |
the number days between entry and exit |
tradeDirection[ ] |
the direction (LONG or SHORT) |
tradeDollarsPerPoint[ ] |
the entry day dollars per point |
tradeEntryBPV[ ] |
the entry bpv of the instrument |
tradeEntryDate[ ] |
the entry date |
tradeEntryFill[ ] |
the entry fill price |
tradeEntryOrder[ ] |
the entry order price |
tradeEntryRisk[ ] |
the entry risk as a percent of entry day trading equity |
tradeEntryStop[ ] |
the protective stop on the day of entry |
tradeEntryTime[ ] |
the entry time |
tradeExitDate[ ] |
the exit date |
tradeExitFill[ ] |
the exit fill price |
tradeExitOrder[ ] |
the exit order price |
tradeExitTime[ ] |
the exit time |
tradeMaxAdverseExcursion[ ] |
the maximum adverse excursion of the trade in points |
tradeMaxFavorableExcursion[ ] |
the maximum favorable excursion of the trade in points |
tradeMinFavorableExcursion[ ] |
the minimum favorable excursion |
tradePositionReferenceID[ ] |
Each unit in a position is given a the unique unit reference ID that is passed on to this historical trade property. This ID number is assigned to the position when it is enabled, and is then available for each closed trade unit using the unit index with this property. See instrument.unitPositionReferenceID[ ] and order.referenceID. |
tradeProfit[ ] |
the closed out profit including slippage and commission |
tradeProfitPercent[ ] |
the profit as a percent of entry day trading equity |
tradeQuantity[ ] |
the quantity in shares or contracts |
tradeRuleLabel[ ] |
the rule label string as set in the unit, or the order that created the unit. |
tradeUnitNumber[ ] |
the unit number |
Edit Time: 9/21/2020 2:37:04 PM |
Topic ID#: 370 |