After you set up and successfully build your AlgoTrader project:
It's time to run and test it. The first thing that you need to do to prepare your Algotrader to the first start is to fill your database with sample data. To do so first you need to execute flyway script that will create a proper schema in your database:
1. Open your terminal window, in your bootstrap project go to:
flyway clean migrate
after successful execution:
We can load our sample data to the database, mysql-data.sql file containing sample data can be found in bootstrap project files:
2. When our database is set up and running it's time to run the Reference data starter.
In your eclipse environment click Run -> Run configurations
Create a new Java Application launcher and set Project as:
and Main Class as:
After that go to the Arguments tab
Here it's needed to provide program arguments, what's already described in the Reference Data section in our documentation: Reference Data and VM arguments, Spring profiles:
and proper exchange keys. Click Run.
After successful execution your console log should look like this:
3. Now everything is set up and ready to run AlgoTrader Server Starter to do this again in your eclipse environment click Run -> Run configurations and create a new Java Application launcher with Project set as:
and Main Class as:
After that go to the Arguments tab and provide VM Arguments:
and proper exchange keys.
For further information regarding launching AlgoTrader check our documentation: http://doc.algotrader.com/html_single/index.html#Distributed_Mode
In our Bitfinex example ServerStarter Arguments tab will look like this:
After few seconds your browser window will popup with AlgoTrater UI:
Here you can subscribe securities that you are interested in and put orders manually. It is possible to run ServerStarter as Exchange simulator too. To use the Exchange Simulator the Spring profile
simulation has to be used, e.g.
Note that when using the Exchange Simulator in live trading, order will be executed against live data internally and will not get sent to the external Broker or Exchange. If the Spring Profile
simulation is enabled all other external Order Services will be disabled.
-Dsimulation=true denotes a back test and will effectively disable external MarketData services, so if the intention is to run exchange simulator against live market data, make sure that this parameter is set to
All external order services must be disabled, e.g. Spring profiles like bFX, bFL etc must be inactive, for further details please see Exchange Simulator section of our documentation.
Additional spring profiles for different exchanges available in AlgoTrader: Spring Profiles