DCA with Autoview: a recurring buy, start to finish

Autoview · Guide · Template · Updated September 30, 2026

Part of Common strategies with Autoview, which shows how well-known strategy types run through Autoview, from signal source to a demo account.

Dollar-cost averaging, or DCA, means buying the same amount on the same schedule and ignoring the price on the day. This guide takes you from nothing to a recurring buy that runs on its own. You start on a free OANDA Practice account, so every step up to the last one uses demo money. Follow the seven steps in order. Each one ends where the next one starts.

What DCA is and why traders use it

You pick an amount and an interval, say a fixed sum every Monday, and you buy that amount every time the interval comes round. When the price is low, your fixed amount buys more units. When it's high, it buys fewer. Over many buys, your average cost sits somewhere inside the range the price moved through, instead of depending on one moment you had to pick.

Traders use it for two reasons. It averages the entry price over time, so no single day sets your cost. And it takes timing and emotion out of the decision: you don't have to guess the right day, and a frightening week doesn't talk you out of buying, because the buy happens on schedule either way.

DCA still carries risk. It doesn't make a losing asset profitable, and it keeps buying all the way down a long decline. Whether that trade-off suits you is your call.

There's a second style that people also call DCA: splitting one entry across several prices below the market, so a dip fills you at a better average. That's price-based, not time-based, and it has its own worked template, the Bybit perpetual DCA entry with a trailing stop. This page is the time-based kind.

How Autoview helps a DCA strategy

The hard part of DCA is sticking to it for months. Autoview places the buys for you, so the plan keeps going whether or not you remember it that week.

  • Every buy is the size you set. You write the size into one command, and Autoview places that order each time the command arrives. On OANDA, u=currency turns the size into an amount of money, so each buy spends roughly the same sum.
  • It buys on your schedule. You pick the interval in your scheduler. Each time the scheduler sends the command, Autoview places the buy.
  • It runs with your computer off. Autoview receives the command and places the order server-side. Pair it with a hosted scheduler or a TradingView alert and nothing has to stay switched on at your end.
  • It trades on the account you already use. Autoview connects to more than 20 exchanges and brokers, so the buys go to the account you already hold. This guide uses OANDA Practice so you can rehearse with demo money first.
  • You can check it before real money moves. Add d=1 and Autoview works out the order and writes it to your log without sending it to the exchange.

How a recurring buy works on Autoview

A recurring buy needs a scheduler. Autoview places an order when a command arrives at your webhook, whatever sent it. So a recurring buy is two pieces:

  1. A sender on a timer. TradingView, or any system that can send a webhook on a schedule: a cron job on your own machine or server, a hosted scheduler, or a workflow tool like n8n or Zapier. Its only job is to send the same text at the same interval.
  2. One Autoview command in that text. A market buy for a fixed amount. Autoview reads it and places the order on whichever account the webhook is linked to.

Keeping the schedule in the sender means you can change when it runs without touching the command, and change the command without touching the schedule.

Before you start

  • An Autoview account. A free account is enough for everything up to Step 7.
  • No money. OANDA Practice is free, and its connection on Autoview is priced at $0.

This guide uses the webhook platform, which runs server-side, so your computer can be off when a buy fires. That matters for something meant to run every week for months.

Step 1: open an OANDA Practice account and get an access token

OANDA Practice is OANDA's free demo account, with its own demo balance and its own login, separate from any live OANDA account. You need two values from it: an Account ID and an Access Token.

  1. Register at register.oanda.com and choose fxTrade Practice, not MetaTrader (MT4). Autoview uses OANDA's v20 API, which MT4-only accounts can't reach.
  2. Sign in to hub.oanda.com with the Practice login and generate a personal access token at hub.oanda.com/tpa/personal_token. OANDA shows it once, so copy it straight away.
  3. Copy your Practice Account ID too. It has four hyphen-separated groups, shaped like ###-###-#######-###.

Both values have to come from the Practice side. A Practice token with a live Account ID, or the other way round, fails to authenticate. The OANDA Practice guide has the full walkthrough, including OANDA's alternate menu path to the token page.

You're done with Step 1 when you have a Practice Account ID and a Practice Access Token saved somewhere private.

Want to see the connection first? Our OANDA Practice video connects a Practice account to Autoview, writes a market buy on EUR_USD, dry-runs it with d=1, and checks the result in webhook history. It runs about eight minutes: watch the OANDA Practice walkthrough on YouTube.

Step 2: link OANDA Practice in Autoview

Autoview has a guided wizard for OANDA Practice. It walks through saving the credentials, creating a webhook, and linking the two, so Steps 2 and 3 of this guide happen inside it.

  1. Log in to Autoview and click Connect in the top bar. That opens Connect an exchange.
  2. Choose the OANDA Practice card, not OANDA. To shorten the list, set Access to Free & demo at the top of the page. Practice is its own connection, not a setting on live OANDA.
  3. On Save your OANDA credentials, paste your Practice values into Account ID and Access Token, and pick a Zone from the list. The Zone is where your commands execute. If the list is empty, contact support before saving.
  4. Click Add API Keys.

If OANDA later rejects the credentials, check both values for a stray space, and check that both came from Practice. That mismatch is the most common reason a first OANDA connection doesn't work.

You add the keys yourself, in the browser. If you use an AI agent through Autoview's MCP server, paste the keys into the wizard yourself. Exchange keys and tokens stay out of the MCP entirely, by design. After that, the agent can see the connection when it reads your account.

You're done with Step 2 when the wizard has moved on to creating a webhook.

Step 3: create your webhook and copy its URL

A webhook is the private address your schedule will send the command to. A new webhook isn't tied to any account until you link it, so this step has two parts, and the wizard shows both.

Saving your keys in Step 2 doesn't create a webhook, and creating a webhook doesn't link it. The keys, the webhook, and the link between them are three separate things. An order only goes through when all three are in place.

  1. Create the webhook. Give it a Webhook Name that says what it does, for example dca-practice, and click Create Webhook. There's an optional Webhook Key field here too (more below).
  2. Link it to OANDA Practice. Under Select your webhook, pick the one you just made and click Link Webhook and API Keys. The list shows every webhook on your account, so match by name rather than taking the first one.

Then copy the URL. Open Connections, find your webhook under Webhooks, and click Copy link. It looks like https://api.autoview.com/hook/<identifier>/. Keep it private: anyone who has it can send your account a command. On the same page, your OANDA Practice card should list the webhook as linked. If it says Needs a link, use Link a webhook on that card.

The webhook key is a shared secret every request has to carry. It's optional, but worth setting on a webhook that will fire unattended. If you set one, add it to the URL as ?key=yourkey.

The link tells Autoview which account an alert should trade on. If your dry run in Step 4 comes back saying no OANDA Practice credentials or API keys are linked to your webhook, the webhook exists but isn't linked to the connection. Link it on the Connections page and send the dry run again.

Using an AI agent? Its hooks and setup tools list each webhook with the exchanges linked to it. A webhook with no exchange listed isn't linked yet.

You're done with Step 3 when you have the webhook URL copied and Connections shows it linked to OANDA Practice.

Step 4: write the command and dry-run it

Here is the recurring buy. On the webhook platform the webhook already knows which account it trades on, so the command doesn't name the exchange:

s=EUR_USD b=buy t=market q=100 u=currency

If you use the Chrome extension instead, it picks the account from e=, so the same command reads:

e=oandapractice s=EUR_USD b=buy t=market q=100 u=currency
ParameterWhat it does here
e=oandapracticeExtension only. Routes the order to your OANDA Practice connection. Live OANDA uses e=oanda.
s=EUR_USDThe instrument. OANDA writes instruments uppercase with an underscore, EUR_USD, not EURUSD.
b=buy t=marketA market buy, filled at whatever the price is when the command runs. That's the point of time-based DCA: you take the day's price, whatever it is.
q=100 u=currencyThe size. u=currency makes q= an amount in your account's currency, converted to units at the live rate, so each buy spends roughly the same amount. Without u=currency, q=100 would mean 100 units of the instrument, a fixed quantity rather than a fixed amount.
d=1Dry run. Autoview works out the order and writes it to your log without sending anything to OANDA. Remove it only when you mean to place the order.

Always set q=. Leave it off and Autoview uses 100% of the relevant balance. On a command that fires every week without you watching, that's the one mistake worth checking twice.

Send the dry run once, by hand

Add d=1 and send the command to your webhook one time. The quickest way from a terminal, with your own webhook URL in place of the placeholder:

curl -X POST "https://api.autoview.com/hook/<identifier>/" -H "Content-Type: text/plain" --data-binary "s=EUR_USD b=buy t=market q=100 u=currency d=1"

No terminal? Create a one-off TradingView alert with the same text in its Message box and your webhook URL in the Webhook URL field, as in the TradingView alerts guide, and let it fire once. The custom webhooks page covers other ways to send it.

The wizard's last step also has a Send test alert (dry run) button. It sends the wizard's own sample order, not this command, so it's a good check that the link works, but still send the command above to check the size.

Read the log

Open Activity in the top bar, which is the Event Log. The Dry run filter narrows it to dry runs. The dry run should show one entry with the instrument, the side, and the number of units q=100 u=currency resolved to at today's rate. Check that the unit count looks like the amount you meant. If it doesn't, fix the command now.

  • Nothing in the log: the request didn't arrive. Check the URL, and the key if you set one. See alert not reaching Autoview.
  • No credentials or API keys linked to the webhook: go back to Step 3 and link the webhook to OANDA Practice.
  • Unknown market symbol: the instrument needs the underscore, EUR_USD.

You're done with Step 4 when the log shows one dry-run entry for a market buy of EUR_USD at the size you expected.

Step 5: place one real Practice buy

Now send exactly the same command without d=1, once, by hand:

s=EUR_USD b=buy t=market q=100 u=currency

Then check it landed, in two places:

  1. The Event Log. The entry should read Live in the Mode column, not Dry run, with OANDA's response to the order. If it still reads Dry run after you removed d=1, check the OANDA Practice card on Connections for a note that orders run in simulation mode.
  2. Your OANDA Practice account itself. Sign in to OANDA with the Practice login and look for a new open EUR_USD position. The Autoview log shows what OANDA told Autoview. Seeing the position in OANDA is how you know the order really did what you meant.

OANDA is a forex and CFD broker, so this buy opens a position on margin rather than buying and holding currency outright. It stays open until you close it. To tidy up after the test, close it in OANDA, or send s=EUR_USD c=position, which closes the whole EUR_USD position at once. The OANDA command reference explains how that close behaves.

You're done with Step 5 when one Practice buy shows in both the Autoview log and your OANDA Practice account.

Step 6: put it on a schedule

Use TradingView, or any system that can send a webhook on a schedule. Each option ends the same way: the command text, without d=1, arrives at your webhook once per interval. Pick one sender, not two.

Option A: a cron job or any scheduler that can send a POST

A scheduler you control is the most direct route. This crontab line sends the buy every Monday at 14:00 in the machine's own time zone:

0 14 * * 1 curl -s -X POST "https://api.autoview.com/hook/<identifier>/?key=yourkey" -H "Content-Type: text/plain" --data-binary "s=EUR_USD b=buy t=market q=100 u=currency"

Set Content-Type explicitly. Some clients default to a form-encoded body, and Autoview's webhook turns that away with a 415 before it reads your command. Plain text works, and so does JSON in the shape the custom webhooks page shows. Leave off ?key=yourkey if you didn't set a key in Step 3.

The same request works from Windows Task Scheduler, a hosted cron service, or a scheduled workflow in n8n or Zapier. The interval is whatever that tool supports.

Option B: a TradingView alert

TradingView alerts fire on a condition, not a clock. For a recurring buy, open a chart whose timeframe matches your interval, for example a weekly chart for a weekly buy, and create an alert that fires once per bar. Put the command in the alert's Message box and your webhook URL in the Webhook URL field on the Notifications tab.

Create this alert in TradingView yourself. If you use an AI agent, Autoview's alert tool builds the pieces for you: the message, your webhook URL, an expiry, and a chart timeframe. Paste them into a new alert in TradingView in your browser, or use Option A.

TradingView alerts expire. An alert's maximum lifetime is two months unless it's set open-ended, which needs TradingView's Premium or Ultimate plan. An expired alert just stops, with nothing in your Autoview log. For a buy meant to run for months, check the expiry, or use Option A. More on this in alert not reaching Autoview.

Make sure each interval buys once

A double fire means a double buy, so check these before you leave it running:

  • One sender only. If you tried both a cron job and a TradingView alert, delete the one you're not keeping. Delete the one-off test alert from Step 4 too.
  • One link on the webhook. If the webhook is also linked to another connection, every buy goes to both. Check the linkage section.
  • No automatic retries. Autoview acknowledges a webhook request right away, before it places the order, so a slow order is never a reason for the sender to retry. Turn retries off in your scheduler if it has them.
  • Watch the first few runs. After each of the first scheduled buys, check the log for exactly one entry, and your OANDA Practice account for exactly one new buy.

You're done with Step 6 when a few scheduled buys have landed on Practice, one per interval, at the size you meant.

Step 7: move to a live account

Read this before you switch. OANDA is a forex and CFD broker, so live OANDA gives you positions on margin, not an asset you hold outright. A weekly market buy there keeps adding to a leveraged position, which can lose more quickly than the amount each buy spends. Practice was a rehearsal of the plumbing: that the schedule fires on time, the webhook accepts it, the size resolves the way you meant, and nothing fires twice. It wasn't a model of long-term accumulation.

If what you want is to accumulate a crypto asset you actually hold, run the same schedule against a crypto spot exchange instead. The schedule stays the same; only the command line and the linked connection change.

What changes

WhatOn PracticeOn live
ConnectionOANDA PracticeLive OANDA, or a crypto spot exchange, set up as its own connection with its own keys
Token or API keyPractice Access TokenA new token or key from the live side. Practice credentials don't work on live.
WebhookLinked to OANDA PracticeLinked to the live connection. A new webhook for live keeps the two apart.
SubscriptionNone, Practice is freeLive trading needs a paid subscription for that exchange. See pricing.
Exchange keyword (extension only)e=oandapracticee=oanda, or the exchange's own keyword
Sizeq=100 u=currencyA size you'd be comfortable seeing go wrong once. On crypto spot, q= can mean something different; check the exchange's own reference.
  • Live OANDA. Follow getting started with OANDA to connect it with a live Account ID and Access Token, then repeat Steps 3 to 5 against it.
  • A crypto spot exchange. Sizing is exchange-specific, so write the line from that exchange's reference rather than copying the OANDA one. On Crypto.com spot, for example, q= is an amount of the coin, not of the currency. Start from the Crypto.com spot, Kraken spot, or Bybit spot cheat sheet, then repeat Steps 3 to 5.

Either way, dry-run the new command with d=1, place one buy by hand, then point the schedule at the new webhook and turn off the Practice one. Read the log after the first live run.

Start safely

Before a recurring buy runs on its own, bring it up one step at a time. Steps 4 to 6 cover each of these in detail.

  1. Dry-run first. Send the command once with d=1. Autoview writes the order it would place to your Event Log and sends nothing to the exchange. Check that the unit count matches the amount you meant.
  2. Place the first Practice buy by hand. Remove d=1 and send the command once yourself. Confirm the buy in the Event Log and in your OANDA Practice account.
  3. Watch the first few runs. Once the schedule is on, check after each of the first few runs for exactly one new entry in the log and exactly one new buy on Practice. If you see two, find the second sender or the second link before the next run.

Do the same when you move to a live account. Every parameter on this page is in Autoview's OANDA command reference, if you want to change the command.

Start with OANDA Practice