Trading4j - core

Contains the core framework that is independent from a concrete broker.

License

License

GroupId

GroupId

de.voidnode.trading4j
ArtifactId

ArtifactId

core
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Trading4j - core
Contains the core framework that is independent from a concrete broker.

Download core

How to add to project

<!-- https://jarcasting.com/artifacts/de.voidnode.trading4j/core/ -->
<dependency>
    <groupId>de.voidnode.trading4j</groupId>
    <artifactId>core</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/de.voidnode.trading4j/core/
implementation 'de.voidnode.trading4j:core:0.1'
// https://jarcasting.com/artifacts/de.voidnode.trading4j/core/
implementation ("de.voidnode.trading4j:core:0.1")
'de.voidnode.trading4j:core:jar:0.1'
<dependency org="de.voidnode.trading4j" name="core" rev="0.1">
  <artifact name="core" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.voidnode.trading4j', module='core', version='0.1')
)
libraryDependencies += "de.voidnode.trading4j" % "core" % "0.1"
[de.voidnode.trading4j/core "0.1"]

Dependencies

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5
org.assertj : assertj-core jar 3.0.0

Project Modules

There are no modules declared in this project.

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.

Versions

Version
0.1