Supported Models
Oanda
Introduction
This page explains the OandaBrokerageModel, including the asset classes it supports, its default security-level models, and its default markets.
SetBrokerageModel(BrokerageName.OandaBrokerage, AccountType.Margin);
self.set_brokerage_model(BrokerageName.OANDA_BROKERAGE, AccountType.MARGIN)
For more information about this model, see the class reference and implementation.
For more information about this model, see the class reference and implementation.
Orders
The OandaBrokerageModel supports several order types, the TimeInForce order property, and order updates.
Order Types
The following table describes the available order types for each asset class that the OANDABrokerageModel supports:
| Order Type | Forex | CFD |
|---|---|---|
| Market | ![]() | ![]() |
| Limit | ![]() | ![]() |
| Stop market | ![]() | ![]() |
| Stop limit | ![]() | ![]() |
Time In Force
The OANDABrokerageModel the GoodTilCanceledGOOD_TIL_CANCELED TimeInForce.
DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled; LimitOrder(_symbol, quantity, limitPrice);
self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED self.limit_order(self._symbol, quantity, limit_price)
Updates
The OANDABrokerageModel supports order updates.
Fills
The OandaBrokerageModel uses the ImmediateFillModel.
Slippage
The OandaBrokerageModel uses the NullSlippageModel.
Fees
The OandaBrokerageModel uses the ConstantFeeModel with zero fees. OANDA offers "Spread" and "Core + Commission" pricing models. Our data is the spread dataset, so we model the spread pricing. To estimate OANDA Core+Commission data, use a custom fee model and a custom fill model.
security.SetFeeModel(new ConstantFeeModel(0.0m));
security.set_fee_model(ConstantFeeModel(0))
Settlement
The OandaBrokerageModel uses the ImmediateSettlementModel for Forex trades and the AccountCurrencyImmediateSettlementModel for CFD trades.
Margin Interest Rate
The OandaBrokerageModel uses the NullMarginInterestRateModel.
Account Currency
The OandaBrokerageModel doesn't set a default currency.
To change the algorithm's currency from USD to a different currency, see Set Account Currency.
