Supported Models

Trading Technologies

Introduction

This page explains the 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.set_brokerage_model(BrokerageName.TRADING_TECHNOLOGIES, AccountType.CASH)
self.set_brokerage_model(BrokerageName.TRADING_TECHNOLOGIES, 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 TypeFutures
MarketOrdergreen check
LimitOrdergreen check
StopMarketOrdergreen check
StopLimitOrdergreen check

The TradingTechnologiesBrokerageModel enforces the following order rules:

  • If you are buying (selling) with a StopMarketOrder or a StopLimitOrder, 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.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED

def on_data(self, slice: Slice) -> None:
    # Use default order order properties
    self.limit_order(self.symbol, quantity, limit_price)
    
    # Override the default order properties
    order_properties = OrderProperties()
    order_properties.time_in_force = TimeInForce.DAY
    self.limit_order(self.symbol, quantity, limit_price, order_properties=order_properties)

Updates

The TradingTechnologiesBrokerageModel supports order updates.

Fills

The TradingTechnologiesBrokerageModel uses the FutureFillModel.

Slippage

The TradingTechnologiesBrokerageModel uses the NullSlippageModel.

security.set_slippage_model(NullSlippageModel.instance);
security.set_slippage_model(NullSlippageModel.instance)

Fees

The TradingTechnologiesBrokerageModel uses the ConstantFeeModel with zero fees.

security.SetFeeModel(new ConstantFeeModel(0.0m));
security.set_fee_model(ConstantFeeModel(0))

Buying Power

The TradingTechnologiesBrokerageModel uses the FutureMarginModel.

Settlement

The TradingTechnologiesBrokerageModel uses the FutureSettlementModel.

Margin Interest Rate

The TradingTechnologiesBrokerageModel uses the NullMarginInterestRateModel.

Default Markets

The default market of the TradierBrokerageModel is Market.CME.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: