Real-funds runs
Set up, start, watch and stop a Real Trade run in a venue's production environment, and check the venue's own record afterwards.
Real money
A run in the production environment places real orders on your real account. The algorithm can lose money, and Neurotrader sets no limit on how much. Nothing here is financial advice. Use an amount you can afford to lose, and rehearse the same setup in a Demo run first.
You have tested an algorithm of your own, rehearsed it with demo funds, and now want it to trade your account. This guide covers the whole life of a run with real funds: what you need, how to set the runner up, what the app asks before every start, how to stop, and what to check at the venue afterwards.
Prerequisites
You need three things:
- A production credential. An API key issued by the venue's production site, stored under Credentials in Settings. A Demo key does not work here: a key is valid only in the environment that issued it. The key must be allowed to trade and must not be allowed to withdraw. See Venue account connection.
- A confirmed algorithm. An algorithm of your own that you have run in a simulation and confirmed. See Algorithm confirmation.
- A funded venue account. The account must hold the currency you measure results in, or one of the assets the algorithm trades. It must have no open orders on the instruments the run will trade.
For what is specific to Binance, see Binance.
Runner setup
The Real Mode page
Open Real Mode in the sidebar and create a new real trade.
The production environment
Under Connection, choose the environment. A venue offers two:
- Demo: the venue's rules and limits against a demo balance. Orders use demo funds.
- Production: real orders on your real account.
Choose the production environment. Below the choice, the app shows the credential the runner will use and whether it is stored. If it reads Not stored, Awaiting key or Wrong environment, fix the credential in Settings before you go on: the run cannot start without it.
There are no balances or fees to enter. The venue holds the account and charges the fees, and the run shows what the venue reports.
Instruments
Add the instruments the algorithm trades and choose the candle interval. A run at a venue reads live prices, so there is no date range. Only instruments the venue lists are offered.
The algorithm
Choose your confirmed algorithm and set its parameters.
A venue account has one balance, so it runs one algorithm. To run several strategies on the account, combine them into an algorithm group.
Built-in algorithms are not offered here, and the app shows the reason beside them. They are yardsticks and textbook rules, not strategies to put money behind, so Neurotrader refuses them with real funds. A group that contains one is refused as well. An algorithm of your own that is not confirmed is refused too, by name. See Real trading safety.
Review
Check the summary and create the runner. It opens on its own page under Real Mode.
Production and Demo runners
A production runner and a Demo runner are set up the same way and look alike while they run, and mixing them up is the most expensive mistake you can make here. So every runner at a venue carries a marker that names the venue and the environment, and it appears everywhere the runner does:
- on the runner's card on the Real Mode page,
- in the toolbar of the runner's page,
- on the Connection card of the runner's page,
- across the top of the page while the run is in progress,
- across the top of a finished run's record.
For a production runner the marker says that orders use real funds. For a Demo runner it says demo funds. The environment is fixed when the runner is created. To move a setup from Demo to production, create a new runner.
Start
Open the runner's page and check the Connection card: the venue, the environment and a credential that reads Stored.
Start the run from the toolbar. The app opens the dialog Start this real trade?. It appears before every start, and nothing in it is remembered from last time. It lists:
- Orders go to: the venue and the environment, with the statement that the run uses real money,
- Algorithms: the algorithm that will trade,
- Instruments: what it will trade,
- Credential: the stored credential whose account the orders are placed on.
Read every row. This is the last moment to notice that you opened the wrong runner.
Select Start trading. To back out, select Cancel: nothing has been sent to the venue.
The dialog limits nothing. Once the run is going, what the algorithm does is up to the algorithm.
Before the first order, Neurotrader checks the setup against the venue. The start is refused, with the reason and without any order being placed, when:
- the algorithm is a built-in one, or is not confirmed, for example because you rebuilt the plugin since you confirmed it,
- the credential is missing, was issued for another environment, may not trade, or may withdraw,
- an instrument is not trading at the venue,
- the account already has open orders on the runner's instruments (the refusal names them),
- the account holds nothing the run could trade with.
Run in progress
While the run is going, the runner's page shows the live picture, with the environment marker across the top:
- the account's net worth and its change since the start, as the venue reports the balances,
- the price chart, with the algorithm's orders marked on it and its resting orders drawn as price levels,
- the activity feed of orders as they are placed, filled, rejected or cancelled,
- a heartbeat that shows when the last update arrived and when the next candle closes.
Fills, balances and open orders are shown as the venue reports them. The venue may round a price, reject an order or fill only part of it, and the page shows what happened, not what the algorithm asked for.
A run at a venue cannot be paused. The market would move on without it. You stop it, and start a new run later.
Keep the computer on, awake and connected for as long as the run should trade. The algorithm runs on your computer.
Stop
Select Stop on the runner's page. The dialog Stop this live run? lists the orders the run has working at the venue at that moment.
Choose what happens to them. Nothing is preselected, and you must choose:
- Close: Neurotrader cancels every working order, then sells what this run's own fills bought, and waits for the venue to confirm each. What the account held before the run started stays.
- Leave: the run ends, and every working order stays at the venue for you to deal with there. Positions stay as they are.
Select Stop and close or Stop and leave orders. With Close, wait for the run to end. Closing takes as long as the venue takes to confirm, and the run is not finished until it has.
When the run has ended, its record states what the stop did: how many orders were cancelled, what was traded to close, and what was left standing. If any step failed, each failure is listed with the order and the venue's reason, and the record says that the account is not in the state you asked for. In that case, check the account at the venue straight away.
If Neurotrader itself shuts down while a run is going, for example because you shut the computer down, it ends the run as with Leave: it decides nothing for you, and the working orders stay at the venue.
Venue order history
After every run with real funds, compare Neurotrader's record with the venue's own.
- Open the finished run from the runner's history. Its journal lists every order the algorithm issued and what became of it. See Execution journal.
- Sign in at the venue and open the order history and the trade history of the same account, for the same period.
- Check that every order in one appears in the other, with the same side, quantity, price and outcome, and that the venue shows no open order you did not expect.
- Check the balances at the venue against what the run reported at its end.
The venue's record is the authoritative one. If the two differ, trust the venue, and settle any open order or position there before you start another run.
Ungraceful end
A run ends ungracefully when it ends without a stop: the computer lost power, the engine crashed, or the run did not answer a stop in time. Nothing was closed and nothing was cancelled. Orders the algorithm placed may still be working at the venue, and positions are as the last fill left them.
When you open the app again, the runner's page shows a notice at the top: This run ended without acting on its orders. It lists the orders Neurotrader last saw working. The notice cannot be dismissed, and the runner stays in an error state.
What to do:
- Go to the venue first. The list in the notice is what Neurotrader last recorded, not what the venue holds now. An order on it may have filled or been cancelled since, and an order may exist that never reached the record.
- Settle what you find. Cancel the open orders you do not want, and decide about the positions. Neurotrader does not reattach to those orders and does not resume the run.
- Reset the runner. Reset clears the error. It changes nothing at the venue.
- Start again when the account is clean. A new start is refused while the account still has open orders on the runner's instruments.
Dropped connection
If the connection to the venue drops while the run is going, the run does not end. Neurotrader reports that the connection was lost and reconnects by itself. When it is back, it asks the venue for the account, the open orders and anything that happened in the gap, and records each fill once. The run reports that the connection is back.
While the connection is down:
- the algorithm cannot place or cancel orders,
- orders already at the venue keep working and can fill,
- the page cannot show what the venue is doing.
If the connection stays down, do not wait for the app. Sign in at the venue, look at the open orders and positions of the account, and manage them there. When the connection returns, stop the run with the disposition that matches what you did at the venue, then compare the two records as described in Venue order history.
Related
- Real trading safety: the risks and the two rules
- Algorithm confirmation: confirm an algorithm of your own
- Demo runs: the same run with demo funds
- Venue account connection: credentials
- Binance: what is specific to Binance
- Operation modes: Real Trade among the other modes
Algorithm confirmation
Run an algorithm of your own in a simulation, look at its results and confirm it, so that it can trade real funds.
Plugin upload
The Algorithms page for your own plugins: upload a built package, link a project on this computer, build, load, unload, reload and remove, with the states and refusals explained.