Giter Club home page Giter Club logo

trading4j's Introduction

Trading4j

Trading4j is a library that allows to write automated expert advisors for Forex trading. The library promotes writing code that is reusable across different expert advisors by clearly separating between different aspects of expert advisor programming. In Trading4j these aspects are strategies, indicators, money management and order filtering.

Expert advisors written with trading4j can place orders through the well known trading terminal MetaTrader. Therefore a wide range of brokers is supported while still having all the benefits of programming on the Java platform.

License

Trading4j can be used under the terms of the GNU General Public License Version 3.

Getting Started

To get started with programming with trading4j take a look at the examples directory. The example contains a server that serves an exemplary expert advisor.

To connect MetaTrader to the server a Trading4j client must be installed. It can be downloaded from the releases tab. Unzip the client into the MetaTrader directory. The client should now be available as an expert advisor in MetaTrader terminal, e.g. for backtesting or live trading. The Import of DLLs option must be enabled in MetaTrader for Trading4j to function properly.

On the Java side, Trading4j is available as Maven artifact with the following Maven coordinates.

<dependency>
  <groupId>de.voidnode.trading4j</groupId>
  <artifactId>server</artifactId>
  <version>[some_version]</version>
</dependency> 

The newest version available can be found on Maven Central.

Compiling the client for MetaTrader 4

The directory client-metatrader contains a MetaTrader compatible expert advisor. This expert advisor will connect to the server created with trading4j to delegate the trading decisions. To build it, enable the Maven project client-metatrader by activating the Maven Profile client-metatrader. At the moment you need a C/Windows cross-compiler named i686-w64-mingw32-gcc. In Ubuntu 16.04 you can get this by installing the package mingw-w64. You also need wine and a MetaTrader installation. You need to set up the Maven property metaeditor.executable (e.g. in your settings.xml) to point to the metaeditor.exe executable. A working Maven comand line could look as the following: mvn -Pclient-metatrader -Dmetaeditor.executable="~/.wine/Program Files (x86)/MetaTrader 4/metaeditor.exe" install.

After the build you get the client as a ZIP bundle in the target folder.

trading4j's People

Contributors

rbi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trading4j's Issues

Headless mode?

Hello

Is it possible to run trading4j and mt4 in headless mode?

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.