
Independent PineHook setup guide. PineHook is not affiliated with or endorsed by OANDA.
Can You Automate OANDA with TradingView? MT5 Setup (2026)
Yes, you can automate a TradingView strategy on an eligible OANDA MT5 account by sending the strategy's alerts to PineHook. OANDA Europe supports Expert Advisors on MT5, and PineHook executes each alert through its EA in the signed-in OANDA terminal.
OANDA account and platform availability depends on the regional entity and sub-account. Where OANDA enables its TradingView connection, traders can place and manage orders from the chart through the Trading Panel, as shown in OANDA's TradingView guide. This is manual order entry. TradingView does not support automated strategy trading through a connected brokerage account. PineHook receives the strategy alert and executes its command in OANDA MT5.
OANDA Europe platform and account details verified against the linked official pages on September 19, 2026. Products, platforms, and eligibility can vary by entity, account, and country.
How OANDA automation works#
The complete route has four parts:
- A Pine strategy generates an order message inside a TradingView alert. TradingView documents these messages in its strategy alert guide.
- TradingView sends that message to PineHook's webhook URL. The Creating alerts guide provides the URL and message format.
- The license key at the start of the message identifies the OANDA MT5 account.
- PineHook executes through the MetaTrader 5 EA, then records the accepted command and result in Signal Logs.
The OANDA route in this guide uses an OANDA One sub-account and MT5. OANDA Europe's account comparison assigns MT5 to OANDA One, while other OANDA entities may offer a different platform mix.
| Route | Connection | Best fit |
|---|---|---|
| OANDA MT5 | Sign in to the OANDA MT5 terminal, install the PineHook EA, and attach it to one chart. | Use this for an eligible OANDA One account when the terminal, EA, and internet connection can remain running. See OANDA's MT5 login guide and Connect MetaTrader 5. |
| OANDA TradingView | Authorize an eligible OANDA account from TradingView's Trading Panel and place orders there yourself. | Use this for manual chart trading where the regional entity and account support it. It cannot automate a Pine strategy. See OANDA's TradingView instructions and TradingView's automation limitation. |
OANDA Europe's pages conflict on TradingView eligibility. Its OANDA One guide lists TradingView for live sub-accounts. Its third-party platform guidance says OANDA Europe customers may use TradingView only for analytics. Check the route shown inside your OANDA account. This guide uses the separate MT5 EA route.
Connect OANDA to PineHook#
Start with Choose a platform in PineHook's Platform setup documentation, then confirm that the OANDA account is eligible for MT5.
Connect OANDA MT5#
- Open or select an OANDA account that supports MT5. For OANDA Europe, the OANDA One sub-account is the MT5 account type.
- Download OANDA's MT5 terminal and sign in with the login, password, and assigned server shown in the HUB. OANDA provides the exact steps in its MT5 account guide.
- Follow Connect MetaTrader 5 to install the PineHook EA. One chart is enough, as long as algorithmic trading is on.
- Create an MT5 license in PineHook and copy its key into the EA inputs.
- Add the PineHook webhook URL and a supported command to the TradingView alert.
The OANDA password remains in MT5. PineHook uses the license configured in the EA and does not use the broker login. Keep the terminal, EA, and internet connection active while alerts need to execute, as explained in Connect MetaTrader 5.
Include the OANDA entity, platform, and account purpose in the license name when the HUB contains several sub-accounts.
Verify the symbol and lot size before testing an alert#
Before sending an alert, open the instrument in MT5 Market Watch and compare its name with the ticker used by the TradingView strategy. If OANDA uses another name, configure symbol mapping so PineHook sends the exact MT5 symbol.
OANDA Europe states that OANDA One and MT5 order volume is measured in lots. If TradingView reports units or contracts, configure lot size conversion before testing the alert. OANDA's published MT5 minimums also vary by instrument:
| Instrument class | OANDA Europe MT5 minimum |
|---|---|
| FX CFDs | 0.01 lot |
| Gold or silver CFD | 0.001 lot |
| Germany 40, US Nas 100, US Russ 2000, US SPX 500, or US Wall St 30 CFD | 0.01 lot |
| Other index CFDs | 0.1 lot |
| Commodity CFDs | 0.01 lot |
These values come from OANDA Europe's current minimum trade size table. Check the live MT5 instrument specification as well because availability and limits can differ by entity and account.
Symbol mapping changes the instrument sent to OANDA, while lot size conversion changes the quantity. The difference is especially large for OANDA commodities. Its sub-account specifications list one OANDA One and MT5 lot as 1,000 barrels for WTICOUSD and BCOUSD, 10,000 mmBtu for NATGASUSD, and 25,000 pounds for XCUUSD. At the listed 0.01-lot minimum, those positions represent 10 barrels, 100 mmBtu, and 250 pounds respectively.
Test a TradingView alert#
OANDA Europe says hedging is always enabled on OANDA One and MT5. A strategy can therefore hold several positions in the same symbol at once. Each position can keep its own stop-loss and take-profit levels, including its own multi-level TP and SL schedule. In PineHook, magic= groups the strategy's positions and a unique ticket= names one position inside that group. Reuse the ticket in a later modify or close command to manage only that position while the others retain their stops and targets. A PineHook ticket is separate from OANDA's order and position numbers. See Hedging and netting accounts and Common parameters for the targeting rules.
Use this minimum-size EURUSD command to test an OANDA Europe MT5 account:
YOUR_LICENSE_KEY,buy,EURUSD,size_lots=0.01,magic=1001,ticket=eur-long-001,sl_pips=50,tp_pips=100
The Creating alerts guide provides the webhook URL and message format, while the Default Mode reference defines size_lots, sl_pips, and tp_pips. When the alert fires, confirm in MT5 that the symbol, side, volume, stop loss, and take profit match the command, then compare the result in Signal Logs. OANDA One and MT5 pending orders can be placed only during the instrument's listed trading hours, according to OANDA's sub-account specifications.
Match the strategy costs to the account#
OANDA Europe advertises spreads from 0.6 pips on EURUSD, but the spread available to a strategy depends on the instrument, size, and market conditions. OANDA also applies financing charges or credits to positions held over time. Model the spread and overnight financing observed on the account, then enter any applicable commission and slippage in TradingView's broker emulator.
Margin behavior also depends on the sub-account. OANDA's sub-account specifications state that OANDA One and MT5 calculate initial margin when the deal executes and keep that initial amount static for the life of the deal. Check the account's current margin rate and the free margin shown by MT5 before increasing the test size.
Configure risk controls for the account#
After the alert path is working, add limits that reflect the account's capital and the strategy's tested risk. PineHook's risk-management controls apply independently of the TradingView script. Use them to stop new entries at the account's loss limit and to reject alerts outside the strategy's session, spread, or news rules.
| PineHook control | How it works and why it helps |
|---|---|
| Daily loss limit | Measures the day's loss from the higher of balance or equity at the UTC reset. Use it to stop one poor session from consuming the account's wider risk budget. End of Day drawdown mode already provides a daily guard. |
| Overall drawdown limit | Watches equity against a longer-term floor. Static protects a fixed starting level, while trailing modes and Relative can protect gains as the account grows. Use it to catch a decline that develops across several days. |
| Active trading sessions | Allows new entries only during chosen UTC hours while exits and management remain available. Use it to keep the strategy inside the sessions and liquidity conditions it was tested on. The optional cutoff can flatten positions and remove pending orders. |
| Maximum spread | Refuses a new entry when the live spread exceeds a pip or percentage ceiling. Use it to avoid an abnormal entry cost during rollover or thin markets. It cannot lock the final fill price. |
| News filter | Holds new entries around selected economic releases. Existing OANDA positions and orders remain live. |
Setting a drawdown limit also means deciding what PineHook should do when the account breaches it. You can stop new entries, close open positions, or close them and keep further trading blocked. Since a market exit may fill beyond the trigger, place the threshold inside the maximum loss you are prepared to accept.
These limits do not replace OANDA's margin rules. OANDA Europe says margin rates vary by instrument and regulatory requirements. Record the free margin used by the minimum-size test and leave room for wider spreads and other positions that the strategy may open at the same time.
Use the news calendar before volatile sessions#
OANDA includes an economic calendar in MT5. PineHook adds an entry hold that can use a global window or a per-license override for the OANDA account. The News Filter settings explain that inheritance. Select the license in the News Calendar to preview the releases covered by its saved window.
During the configured window, PineHook holds matching new entries. Close and cancel commands still run, while stop and target changes are held only when that option is enabled. Maximum-spread protection can add another cost check when entries resume.
Copy one strategy to OANDA and other brokers#
A PineHook Trade Copier sends one TradingView alert to several licenses. The destinations can be other OANDA accounts or accounts at completely different brokers. Each license receives the alert with its own size multiplier, so one strategy can use account-specific size without separate TradingView alerts.
The screenshot below shows the same three trades on three licenses at 0.5x, 1x, and 2x. PineHook applies the multiplier to fixed lots and volume calculated from risk, as documented in the Trade Copier reference.
Compare every destination's contract size and minimum volume before setting its multiplier. OANDA's own sub-account specifications show why equal lot values can represent different quantities across account types and instruments.
Frequently asked questions#
Which OANDA account works with this MT5 setup?
For OANDA Europe, MT5 belongs to the OANDA One sub-account. Other OANDA entities can offer different products and platforms, so confirm MT5 inside the account you can open.
Can PineHook connect to OANDA cTrader?
OANDA Europe's current platform directory does not list cTrader, so this guide covers its MT5 route.
Why use PineHook if OANDA connects to TradingView?
OANDA's TradingView connection supports orders through the Trading Panel where the account and entity allow it. TradingView states that Pine strategies cannot trade automatically through a connected brokerage account. PineHook receives the strategy's webhook alerts and executes them through the MT5 EA, while also providing license-level controls, Signal Logs, symbol mappings, and multi-account routing.
What timezone does OANDA MT5 use?
OANDA Europe sets its MT5 servers to GMT+2 in winter and GMT+3 in summer. PineHook active hours use UTC, so convert any server-time schedule before saving it.
Can one OANDA strategy hold several positions in the same symbol?
Yes. OANDA says hedging is always enabled on OANDA One and MT5. Give each PineHook position a unique ticket= when the strategy must modify or close it independently.
Must OANDA MT5 stay open?
Yes. The PineHook EA runs inside MT5, so the terminal and its internet connection must remain active, as described in Connect MetaTrader 5.
Does PineHook need the OANDA password?
No. The broker credentials remain in the OANDA MT5 terminal. PineHook uses the license key configured in the EA, as described in Connect MetaTrader 5.
Create a PineHook account without payment details, or compare this setup with the other broker and prop firm guides.
OANDA is a trademark of its owner. PineHook is independent and is not affiliated with, endorsed by, or sponsored by OANDA, TradingView, or MetaQuotes. Leveraged trading carries a high risk of loss.
