Coder Social home page Coder Social logo

nikolhaas65 / nztrader Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 7.41 MB

Generic Java-based framework for trade automation. Works with IB TWS, but can be extended.

Java 100.00%
trading-platform java strategy tws-api tws trade-automation netbeans

nztrader's Introduction

NZTRADER

Generic Java-based framework for trade automation

This framework is designed to have

  • flexibility in design of strategies (concepts of Macro and Micro strategies are introduced)
  • to be linked to any exchange/broker interface However, as of now it is limited to interact only to Interactive Brokers TWS. As a consequence, the 'JOrder' is a close copy of 'order' from IB.

Project files are setup for NetBeans.

Central Main() is in IBLink.java

Things to do (for those who wants to continue development of it):

  • Framework perhaps can run on your computer (see Config xml files to change directories)
  • Ensure it runs with current TWS/IB (might require change of IB wrapper)

Some description and respective presentation is here:

http://www.innovaest.org/consulting/white-papers/tradeautomationplatformmadeinjava

Installation:

  • project is under NetBeans. Eclipse can run as well
  • install TWS
  • install TWS API (https://interactivebrokers.github.io/#)
    • goto "TSW API\samples\Java" directory and copy those samples into new project.
    • when it asks to add Jar files, add from "TWS API\source\JavaClient" two jar-files: TwsApi.jar and TwsApi_debug.jar
    • this sample is useful to test your connection/problems. Run ApiDemo.java when you are not sure if any of your java apps is linking to TWS

Run NZTRADER:

  • Within TWS Settings -> API/Settings "Enable ActiveX and Socket Clients"
  • within Configurer/mainConfig.xml make sure that wanted security is listed. Examples are given.
    • set directory for output of tickdata: <tick_data_dir>
  • if you want to run FutDirect_Opt strategy make sure to change directory to yours: String out_dir = "E:\DATA\IBOUTPUT"; it is used to dump intermediate calculations of the strategy to backtest numbers. If you dont need it, comment it out.
  • run AlgoTrader/Dispatcher.java
  • click 'IB connect' (low/left corner). next to it the red box will flash green if connection is established
    • in the Output window you must see something like "1 2104 Market data farm connection is OK:usfuture"
    • in right upper window click "Active Feed" to activate feed for particular instrument (stock, futures etc.)
    • Same for Strategy (make sure you select right strategy within IBLink.main)
  • some example strategies are provided.

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.