Giter Site home page Giter Site logo

oanda_trading's Introduction

Automatic Live Trading with the Oanda API Based on Python Multithreading

Oanda_trading is an open-sourced software written in Python to perform algorimic trading with Oanda API. We apply the multithreading framework to handle the market data streaming, trading signal calculation, and order sending.

alt text

Getting Started

  1. Obtain the access token and account ID from the official website of OANDA.
  2. Install MongoDB(v3.2.4), start it as system service.
  3. Install Python(2.7.13) , PyMongo(v3.2.2) and other necessary libraries.
  4. After putting the python scripts in the same directory, modify the access token and account ID in settings.py, change the logging setting in trading_log.py.
  5. Start MongoDB as system service:

sudo service mongod start

  1. Create the database and collections mentioned in the main script(forex_trading_general_171005.py) in MongoDB.
  2. Open a terminal enter the same directory of these python scripts, and start to run the trading program as below,

python forex_trading_general_171005.py

  1. Now you can check the trading signal logs in the log file, and implement your own trading strategy in the main script.

Prerequisites

It is recommended that you run the script in a Ubuntu 14.04/16.04/17.04 LTS system where MognoDB is installed.

You also need an installation of Python 2.7 from Anaconda.

List of Python packages needed:

  • Pandas
  • Numpy
  • PyMongo
  • PyWavelets
  • oandapy (Python wrapper for the OANDA REST API )
  • python-requests

Installing

No installation is required so far for this trading library.


Deployment

Please read this blog (https://www.quantstart.com/articles/Forex-Trading-Diary-1-Automated-Forex-Trading-with-the-OANDA-API) on QuantStart.com before the deployment of this trading program on the clouds or your local servers

Documentation

Please check out architecture_of_oanda_trading.pdf for the multi-threading architecture of this trading system.

Gona make the Wiki page soon:)

Authors

[email protected]

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

Acknowledgments

  • Inspired by Michael Halls-Moore from quantstart.com

Bitcoin Donation

  • If you would like to support my project, please consider donating to this address: 35TkyWD4Vwp66hX8b8U8stABSDyW3pcCS1

oanda_trading's People

Contributors

jiansenzheng avatar

Watchers

James Cloos avatar Duker Ernest Junior avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.