Supported Models
Trading Technologies
Introduction
This page explains TradingTechnologiesBrokerageModel
, including the asset classes it supports, its default security-level models, and it's default markets.
SetBrokerageModel(BrokerageName.TradingTechnologies, AccountType.Cash); SetBrokerageModel(BrokerageName.TradingTechnologies, AccountType.Margin);
self.SetBrokerageModel(BrokerageName.TradingTechnologies, AccountType.Cash) self.SetBrokerageModel(BrokerageName.TradingTechnologies, AccountType.Margin)
To view the implementation of this model, see the LEAN GitHub repository.
Asset Classes
The TradingTechnologiesBrokerageModel
supports trading Futures.
Orders
The TradingTechnologiesBrokerageModel
supports several order types, some TimeInForce
order properties, and order updates.
Order Types
The following table describes the available order types for each asset class that the TradingTechnologiesBrokerageModel
supports:
Order Type | Futures |
---|---|
MarketOrder | ![]() |
LimitOrder | ![]() |
StopMarketOrder | ![]() |
StopLimitOrder | ![]() |
The TradingTechnologiesBrokerageModel
enforces the following order rules:
- If you are buying (selling) with a
StopMarketOrder
or aStopLimitOrder
, the stop price of the order must be greater (less) than the current security price. - If you are buying (selling) with a
StopLimitOrder
, the limit price of the order must be greater (less) than the stop price.
Time In Force
The TradingTechnologiesBrokerageModel
supports the Day
and GoodTilCanceled
TimeInForce order properties.
public override void Initialize() { // Set the default order properties DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled; } public override void OnData(Slice slice) { // Use default order order properties LimitOrder(_symbol, quantity, limitPrice); // Override the default order properties LimitOrder(_symbol, quantity, limitPrice, orderProperties: new OrderProperties { TimeInForce = TimeInForce.Day }); }
def Initialize(self) -> None: # Set the default order properties self.DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled def OnData(self, slice: Slice) -> None: # Use default order order properties self.LimitOrder(self.symbol, quantity, limit_price) # Override the default order properties order_properties = OrderProperties() order_properties.TimeInForce = TimeInForce.Day self.LimitOrder(self.symbol, quantity, limit_price, orderProperties=order_properties)
Updates
The TradingTechnologiesBrokerageModel
supports order updates.
Fills
The TradingTechnologiesBrokerageModel
uses the FutureFillModel.
Slippage
The TradingTechnologiesBrokerageModel
uses the ConstantSlippageModel with zero slippage.
security.SetSlippageModel(new ConstantSlippageModel(0));
security.SetSlippageModel(ConstantSlippageModel(0))
Fees
The TradingTechnologiesBrokerageModel
uses the ConstantFeeModel with zero fees.
security.SetFeeModel(new ConstantFeeModel(0.0m));
security.SetFeeModel(ConstantFeeModel(0))
Settlement
The TradingTechnologiesBrokerageModel
uses the FutureSettlementModel.
Margin Interest Rate
The TradingTechnologiesBrokerageModel
uses the NullMarginInterestRateModel.