Supported Models
Oanda
Introduction
This page explains the OandaBrokerageModel
, including the asset classes it supports, its default security-level models, and it's default markets.
SetBrokerageModel(BrokerageName.OandaBrokerage, AccountType.Margin);
self.set_brokerage_model(BrokerageName.OANDA_BROKERAGE, AccountType.MARGIN)
To view the implementation of this model, see the LEAN GitHub repository.
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 |
Time In Force
The OandaBrokerageModel
the GoodTilCanceled
GOOD_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.