Diamond Strategies - Trading Automation documentation
Help and documentation for developing automated trading algorithms using the Diamond Strategies automation framework.
|
Base class for the trade object used within the backtester and the executor. More...
Public Member Functions | |
void | AddTarget (LimitClose target) |
Recommended method to use to attach a new target order to the trade. More... | |
void | AddStop (LimitClose stop) |
Recommended method to use to attach a new stop loss order to the trade. More... | |
override string | ToString () |
Method to use to convert this trade to a human readable text representation. Contains all the properties of the trade. More... | |
Properties | |
IInstrument | Instrument [get, set] |
Financial instrument that was traded. More... | |
object | Id [get, set] |
Unique trade id More... | |
string | Symbol [get, set] |
Ticker symbol of the traded instrument. More... | |
TradeSides | Side [get, set] |
Trade side. Long, Short or Close. More... | |
TradeStates | State [get, set] |
Current state of the trader. I.e. pending execution, open, closed etc. More... | |
virtual ? double | FloatingPL [get, set] |
Floating profit/loss of the trade. Otherwise known as paper or unrealized profit/loss. More... | |
virtual ? decimal | ClosedPL [get, set] |
Realized profit or loss. More... | |
double? | LimitEntryPrice [get, set] |
Limit entry price. Value only exists stop loss or limit trades. More... | |
double? | ExecutionPrice [get, set] |
Actual fill price of the trade. Only exists on open trades. More... | |
DateTime? | CloseDate [get, set] |
Date when the trade was closed. More... | |
DateTime | ExecutionDate [get, set] |
Date when the trade was filled. More... | |
DateTime | LastUpdateDate [get, set] |
Date when trade values were last refreshed. More... | |
int? | CreationBarIndex [get, set] |
Index of the bar that trade was created on. This value is only viable for backtester trades. More... | |
DateTime | CreationDate [get, set] |
Date when trade was created. More... | |
double? | ClosePrice [get, set] |
Actual average closing price of the trade. More... | |
double | Volume [get, set] |
Trade size. More... | |
List< LimitClose > | TargetOrders [get, set] |
Target orders attached to the trade. Can contain multiple plartial targets. More... | |
List< LimitClose > | StopOrders [get, set] |
Stop loss orders attached to the trade. Can cointain multiple partial stop loss orders. More... | |
string | TargetOrdersPrintable [get] |
Readable text representation of the target orders. More... | |
string | StopOrdersPrintable [get] |
Readable text representation of the stop loss orders. More... | |
List< LimitClose > | InitialTargets [get, set] |
Initial target orders that were created when the trade was submitted. These orders do not change if target orders are modified in the future. More... | |
List< LimitClose > | InitialStops [get, set] |
Initial stop loss orders that were created when the trade was submitted. These orders do not change if stop loss orders are modified in the future. More... | |
List< HistoricalValue > | HistoricalStops [get, set] |
Log of historical modifications of the stop loss orders. Each change in the stop loss order will create a new entry in the list with the date and value of the change. More... | |
List< HistoricalValue > | HistoricalTargets [get, set] |
Log of historical modifications of the target orders. Each change in the target order will create a new entry in the list with the date and value of the change. More... | |
ITrade | ParentTrade [get, set] |
Initial trade that this trade was branched out from. For example partially closing a trade will generate two trades - one that was closed and one with the remaining amount. Both of those trades will contain the initial trade as their parent trade value. More... | |
TradeTypes | Type [get, set] |
Type of the trade. Market or limit trade. Stop loss trades are treated as limit trades. More... | |
DateTime? | TradeExpiryDate [get, set] |
The expiration date of the initial order, provided that a trade is a limit trade of type GTD (Good Til Date). More... | |
string | InitiatorStrategyId [get, set] |
Id of that DiamondStrategy that generated this trade. More... | |
string | InitiatorSubStrategyType [get, set] |
Id of the Sub strategy that generated the trade if such exists. Often GoLong or GoShort can be specified as the sub strategies. The internal value within the strategy that generated the signal if a startegy generates multiple types of signals. More... | |
bool | IsMargin [get, set] |
Value indicating if the trade is a CASH trade or a MARGIN trade. More... | |
List< object > | CustomStrategyProps [get, set] |
List of custom properties that a strategy added to the trade. This is a value that developers can use when creating their strategies if they like to link some information from the strategy to the trade. Maybe an indicator value on the opening of the trader or similar. More... | |
double?? | ProfitTargetPrice [get] |
Average target price of all the attached target orders. More... | |
double?? | StopPrice [get] |
Average stop loss price based on all the attached stop loss orders. More... | |
DiamondStrategy | InitiatorStrategy [get, set] |
Strategy that requested to execute this trade. More... | |
Base class for the trade object used within the backtester and the executor.
|
inline |
Recommended method to use to attach a new stop loss order to the trade.
target | Object of the stop loss to attach. |
|
inline |
Recommended method to use to attach a new target order to the trade.
target | Object of the target to attach. |
|
inline |
Method to use to convert this trade to a human readable text representation. Contains all the properties of the trade.
|
getset |
Date when the trade was closed.
|
getset |
Realized profit or loss.
|
getset |
Actual average closing price of the trade.
|
getset |
Index of the bar that trade was created on. This value is only viable for backtester trades.
|
getset |
Date when trade was created.
|
getset |
List of custom properties that a strategy added to the trade. This is a value that developers can use when creating their strategies if they like to link some information from the strategy to the trade. Maybe an indicator value on the opening of the trader or similar.
|
getset |
Date when the trade was filled.
|
getset |
Actual fill price of the trade. Only exists on open trades.
|
getset |
Floating profit/loss of the trade. Otherwise known as paper or unrealized profit/loss.
|
getset |
Log of historical modifications of the stop loss orders. Each change in the stop loss order will create a new entry in the list with the date and value of the change.
|
getset |
Log of historical modifications of the target orders. Each change in the target order will create a new entry in the list with the date and value of the change.
|
getset |
Unique trade id
|
getset |
Initial stop loss orders that were created when the trade was submitted. These orders do not change if stop loss orders are modified in the future.
|
getset |
Initial target orders that were created when the trade was submitted. These orders do not change if target orders are modified in the future.
|
getset |
Strategy that requested to execute this trade.
|
getset |
Id of that DiamondStrategy that generated this trade.
|
getset |
Id of the Sub strategy that generated the trade if such exists. Often GoLong or GoShort can be specified as the sub strategies. The internal value within the strategy that generated the signal if a startegy generates multiple types of signals.
|
getset |
Financial instrument that was traded.
|
getset |
Value indicating if the trade is a CASH trade or a MARGIN trade.
|
getset |
Date when trade values were last refreshed.
|
getset |
Limit entry price. Value only exists stop loss or limit trades.
|
getset |
Initial trade that this trade was branched out from. For example partially closing a trade will generate two trades - one that was closed and one with the remaining amount. Both of those trades will contain the initial trade as their parent trade value.
|
get |
Average target price of all the attached target orders.
|
getset |
Trade side. Long, Short or Close.
|
getset |
Current state of the trader. I.e. pending execution, open, closed etc.
|
getset |
Stop loss orders attached to the trade. Can cointain multiple partial stop loss orders.
|
get |
Readable text representation of the stop loss orders.
|
get |
Average stop loss price based on all the attached stop loss orders.
|
getset |
Ticker symbol of the traded instrument.
|
getset |
Target orders attached to the trade. Can contain multiple plartial targets.
|
get |
Readable text representation of the target orders.
|
getset |
The expiration date of the initial order, provided that a trade is a limit trade of type GTD (Good Til Date).
|
getset |
Type of the trade. Market or limit trade. Stop loss trades are treated as limit trades.
|
getset |
Trade size.