Forex trading on margin is high risk and not suitable for everyone, because leverage magnifies losses as well as gains and you can lose money quickly.
TradersPost sends forex orders to OANDA. Connect a live OANDA account with an API token: the steps are under Connect OANDA. TradersPost trades currency pairs only, and not every OANDA account can connect: see Accounts That Can Connect.
Supported Brokers
Automating forex: currency pairs on your forex account
Forex on TradersPost trades currency pairs such as EUR/USD on the forex account you connect and control. You send the pair and a size in units, and TradersPost places the order at OANDA.
Tickers are currency pairs
Send the base currency, a slash, then the quote currency. TradersPost sends it to OANDA as EUR_USD.
One pair
EUR
Base
what you buy or sell
USD
Quote
what it is priced in
- EUR/USDBase, slash, quote Accepted
- EURUSDThe TradingView ticker, on a forex strategy Accepted
- EUR/XYZInvalid forex ticker format Rejected
EUR/USD
long or short, never both at once
One pair, written the way OANDA expects
What you send and what OANDA receives.
Euro in US dollars
Forex
You send EUR/USD
-
OANDA
EUR_USD
TradersPost converts the symbol before it places the order. See the forex symbol format docs.
Size in units, not lots
OANDA counts an order in units of the base currency, so the quantity you send is a number of units. 10,000 units of EUR/USD is 10,000 euros.
| If you think in | Send a quantity of |
|---|---|
| Standard lot | 100,000 |
| Mini lot | 10,000 |
| Micro lot | 1,000 |
A mini lot of EUR/USD
Accepted{
"ticker": "EUR/USD",
"action": "buy",
"quantity": 10000
}
Whole units only: a quantity with decimals is rounded down to a whole unit.
On an account held in another currency, the quantity is still units of the base currency. Only P&L is shown in the account currency.
Which OANDA accounts connect
You connect OANDA by pasting an API token from the OANDA Hub (Tools, then API). Whether an account appears depends on the OANDA division that holds it and the kind of sub-account.
- Live account, nettingWith any OANDA division that offers the v20 API. US accounts are netting only. Connects
- Sub-account with hedging onNot listed: TradersPost keeps one position per pair. Not listed
- MT4, OANDA One or MT5 sub-accountNot listed: OANDA does not let TradersPost label orders on MT4, and the others always hedge. Not listed
- OANDA TMS Brokers (EU) or OANDA Global MarketsOANDA does not offer its v20 API to these two divisions. Cannot connect
A token covers the sub-accounts that exist when you make it. Add a sub-account later and generate a new token.
Forex trades Sunday 5:05 PM to Friday 4:59 PM
Most pairs trade around the clock on weekdays, with a six-minute break each day, and are closed on the weekend. All times are New York time.
- SunSunday Opens 5:05 PM
- MonMonday Open all day
- TueTuesday Open all day
- WedWednesday Open all day
- ThuThursday Open all day
- FriFriday Closes 4:59 PM
- SatSaturday Closed
Open 4:59 to 5:05 PM break
OANDA does not open or close positions during the daily 4:59 PM to 5:05 PM break, so avoid sending signals then.
TRY pairs trade a shorter session, Monday to Friday from 8 AM to 5 PM Central European time, and NZD pairs have a second short break.
Order support by connection
What each connection that trades forex accepts, as TradersPost sends it.
Supported Limited Not supported
| OANDA | |
|---|---|
| Direction | |
| Long | Supported |
| Short | Limited 1 |
| Sizing | |
| Fractional quantity | Not supported |
| Order types | |
| Market | Supported |
| Limit | Supported |
| Stop | Supported |
| Stop limit | Not supported |
| Trailing stop | Supported |
| Time in force | |
| Day | Supported |
| Good till canceled | Supported |
| Immediate or cancel | Supported |
| Fill or kill | Supported |
| At the open | Not supported |
| At the close | Not supported |
| Attached exits | |
| Bracket / OCO / OTO | Supported |
| Trailing stop attached | Supported |
| Accounts | |
| Paper trading | Not supported |
- 1 Selling to open accepts market, limit and stop market orders only.
Strategies
Choose Forex as the strategy's asset class. Forex counts as one of the asset classes your plan allows. To limit the strategy to certain pairs, list them in the EUR/USD format.
Paper Trading
The TradersPost paper broker does not trade forex. To check a forex alert without placing an order, send it with "test": true.
Symbols
On a forex strategy TradersPost also reads OANDA's own EUR_USD, and a TradingView alert can send {{ticker}} from a EURUSD chart. A ticker in any other shape is rejected with invalid-forex-ticker-format.
Sizing
A quantity with decimals is rounded down to a whole unit, and Use fractional quantity cannot be turned on for an OANDA subscription.
Amount per position, Risk per position, and Percent of equity use the currency your OANDA account is held in. With Amount per position set to 1000 on a USD account and EUR/USD at 1.0800, TradersPost sends 925 units. On an account held in another currency, the amount is in that currency, and TradersPost converts the pair's price into it. See Position Sizing.
Orders
A take profit, a stop loss, or both can be attached to an entry as a bracket or OTO order. A trailing stop works as a stop loss or an exit, not as an entry. Market orders go to OANDA as fill or kill; send "timeInForce": "ioc" to accept a partial fill instead. See OANDA order types.
If you have any questions about our forex support, you can email us at [email protected].