You can trade with Oanda™ either through the MTR4 bridge, or with a direct API connection using the Oanda plugin. The API connection is preferable due to higher speed, lower spreads, and the ability to trade currencies with minimum volume, such as a single contract. Oanda is a 'dealing
desk' broker with a large selection of index and commodity CFDs, free historical price data, a free API, no minimum monthly investment, no minimum lot size, and a simple margin and fee structure. Especially trading with minimum volume opens interesting possibilities, for instance running strategy tests on real Oanda accounts
with tiny lot sizes, instead of demo accounts. Oanda is an affiliate broker of Zorro and supported with a free Zorro S subscription (not available in all countries).
For opening an Oanda demo account for API access, visit http://www.oanda.com, and select an fxTrader practice account. For opening a live account, use
the affiliate link of the
download page for claiming your free Zorro S subscription (details and conditions here). You will need an Access Token for trading through the API. For this, sign in on the Oanda website with your user name, then select Other Action / Manage API Access for getting your token. It's a long hexadecimal string that
serves as a password. Make sure to store it for later use. You will need to revoke your token and generate a new one when you create a sub-account.
The access token must be put into Zorro's password field for connecting to
Zorro login fields:
||Oanda Account ID, or empty for using the default primary account
||Oanda Access Token
Accounts.csv example entries:
Oanda asset symbols
Currency names can be directly used for Oanda symbols, but most CFD names must be converted to a specific symbol in the asset list. An asset list AssetsOanda.csv with the main CFD symbols is included for this purpose. A list of available assets can be found at https://www.oanda.com/forex-trading/markets/live. Click on the asset to get its symbol name. Note that some assets are not available in all countries, f.i. no CFDs in the US.
Maximum allowed leverage varies from country to country.
The Oanda plugin supports the following additional data streams:
- marketVal: Bid/Ask spread in historical data.
- marketVol: Tick frequency in historical data.
Supported broker commands
The Oanda plugin supports the brokerCommand function with the following commands:
More commands, f.i. for retrieving order book data, can be implemented on user request.
Known Oanda API issues
The Oanda plugin uses the Oanda REST API. Compared with other broker APIs, the REST API is well structured, easy to implement, supports full trade management and allows unrestricted price history access. Known issues of the Oanda API are:
- Historical price data. Compared with FXCM, the Oanda price history is of slightly lower quality due to the reduced number of ticks (max. 24 per minute) and more small gaps. For both reasons T1 data from Oanda has a smaller file size than T1 data from FXCM. On the other hand, Oanda's price history loads faster than FXCM's, and goes further back. Oanda also supports more currency pairs than FXCM.
- Asset parameters. The Oanda V20 API does not return rollover rates, so
swap and commission must be located on the Oanda website and manually entered in the asset list.
- Rate limit violation. Oanda is limited in the number of simultaneous connections and in the price retrieval rate. For reducing the number of requests per second, increase
TickTime and/or reduce
- Compliance. Oanda accounts are NFA compliant. Oanda works around most NFA issues on their side of the API, so the NFA flag needs not be set. Hedge must be either
disabled (Hedge = 0) or in virtual hedging mode (Hedge
= 4 or 5), otherwise closing trades can cause error
messages. Several Zorros cannot trade the same assets on the same Oanda account, because long and short positions can not be opened
simultaneously. Since Oanda requires stop loss orders
to have a unique size, stop loss limits are handled on the Zorro side. Partial closing is supported by the API.
- Multiple instances. Due to the NFA compliance, multiple
Zorro instances can only trade on the same Oanda account when they trade
different assets. Otherwise one Zorro could close positions opened by the
other Zorro by reversal. For trading several systems at the same time with
the same assets, use sub-accounts.
- Shorthand Tickets. Oanda uses 64-bit trade tickets, which can be theoretically a 20-digit number. Zorro deals with them internally, but displays only the last 10 digits on the trade status page.
- Instrument trading halted. Trades can not be opened and closed outside trading hours. The trading hours of CFDs and currencies can be found on the Oanda website.
- Internal server error. Oanda servers occasionally go
offline; during that time all API functions return a message that Oanda
engineers are on their way to fix the problem. This situation normally lasts
only a few minutes and is handled by Zorro.
- No hibernation. The PC must not be reset, restarted, switched off, hibernate, or go in suspend mode while connected to the Oanda API. Otherwise the API may crash and require a Zorro restart.
- API vs FxTrade. Parameters such as equity or trade
profit are updated by the Oanda API more frequently than by the FxTrade
platform. This led people to think that the API returns a different account
equity. Don't worry, a single account can have only one equity value, but
equity changes appear in the API lists and thus on the Zorro window faster
and at different times than in the FxTrade platform.
Links, order, brokers, broker plugin,
MTR4 bridge, IB bridge, FXCM plugin
► latest version online