The Transaction class represents the result of an order (buy, sell, sell short, or cover short) that was placed either during a simulated backtest, or in the Quantacula Studio Signal Hub.
When developing a C# Coded Model, you obtain a Transaction instance as a result of the PlaceTrade method. You can modify certain properties of the Transaction, such as Quantity, to implement customized position sizing in your trading model.
The commission that was applied to the order. In Quantacula Studio, you establish commission in the Backtest Settings interface.
The signal entry date of the transaction. Corresponds to the price bar on which the trading signal was issued.
The date that the backtester filled the order during the simulation.
The price at which the backtester filled the order during the simulation.
Set this property to true to cause the backtester to fill the transaction even if there is not enough simulated capital.
This integer value is used internally by Quantacula to track which Building Block a particular Transaction belongs to. Avoid using this yourself. Instead, you can use the Tag property to store information in a Transaction.
Specifies a weight value to use for determining which transactions the backtester should fill in cases where there are more candidate transactions than available simulated capital. Transactions are sorted by this value during the backtest process, so lower values here will result in a higher order priority.
The BarHistory instance that the transaction was placed on.
Returns true if this is an entry (Buy or Short) transaction.
Returns true if this is an exit (Sell or Cover) transaction.
The order price of the transaction. Does not apply for Market orders.
Contains the order type of the transaction. Possible values are OrderType.Market, OrderType.Limit, OrderType.Stop and OrderType.FixedPrice. Market, Limit, and Stop simulate their corresponding broker order types, while FixedPrice is a theoretical order type intended to support situations where you want to establish a fixed price of an order.
Returns the position type of the transaction, PositionType.Long for Buy and Sell orders, and PositionType.Short for Short and Cover orders.
Contains the number of shares or contracts in the transaction.
The symbol that the transaction was placed on.
Lets you store custom information (an object instance or value type) along with a Transaction. If the Transaction is filled by the backtest engine, the Tag value is passed into the Tag property of the resulting Position object.
Contains the type of transaction, possible values are TransactionType.Buy, TransactionType.Sell, TransactionType.Short or TransactionType.Cover.