The program implements the main idea: use any trading platform API to translate the platform market and trading information into FIX protocol messages which could be used by FIX modules of BJF programs. Thus, a BJF program can use a platform account as a native FIX account.
Dukascopy Bank offers API for JForex accounts: https://www.dukascopy.com/wiki/en/development/get-started-api/development-environment/use-in-eclipse.
Bridge to the JForex platform was designed to work with JForex accounts both as master accounts and as sub-accounts. The master account receives the signals from the JForex trading platform and sends FIX commands which reproduce the JForex operations in the BJF program. The sub-account receives the FIX messages from the BJF program and sends JForex messages which reproduce BJF program operations in the JForex trading platform.
Bridge to JForex program is a Java 8 jar file. In the BJF program, the Bridge to JForex has to be added to the master and/or sub-accounts list as a BJF_FIX account. Bridge to JForex starts automatically together with the BJF program. Bridge to JForex has a simple interface: source account positions and orders in the upper table, destination account positions, and orders – in the lower table. Positions and orders are shown on appropriate tabs. Here is a master account with opened positions:
Here is a master account with STOP and LIMIT orders:
Here is a sub-account with opened positions:
Here is the sub-account with STOP and LIMIT orders:
Initially, the window has the icon ‘Raised bridge’ . After the Dukascopy server connection procedure and JForex strategy starting are performed, the icon changes to ‘Flattened bridge’. Just the change happens, the Bridge to JForex is ready to work.
JForex platform messages, JForex Bridge messages, and BJF program messages are shown in the Windows cmd window:
The settings tab allows to set JForex account parameters and FIX connection settings.
FIX channel settings must follow several rules:
- ‘IP, URL’ – localhost or 127.0.0.1. It means that the Bridge to JForex and BJF program work on a same computer.
- ‘Port quotes’ – odd value, desirable over 30000.
- ‘Port trades’ – even value, desirable over 30000.
In fact, the ports values come here from BJF program settings
- ‘Username’, ‘password’, ‘Sender’, ‘Target’ – necessary FIX account parameters, arbitrary texts. Though if several JForex accounts are used, the different Sender and Target are necessary for each account.
JForex settings include:
- ‘URL for jnlp file’ – https://www.dukascopy.com/client/demo/jclient/jforex.jnlp for Demo account, https://platform.dukascopy.com/live_3/jforex_3.jnlp for Live account.
- ‘Username’, ‘Password’ – JForex account parameters.
- ‘Pin’ – arbitrary text, for Live account only. Pin input is an inevitable manual operation for a Live account connection. Bridge to JForex only detects, is pin empty or not, then shows the Dukascopy pin input window for the Live account or omits the pin input for Demo.
- ‘Non-currency instruments’ could be used for fine-tuning lot size multiplying, in most cases is empty.
- ‘Lot multiplier for currencies’ is used for a deal size recalculation from MT4-MT5 lot size (commonly 100000) to JForex lot size (commonly 1000000).
- ‘Lot multiplier for indexes and CFD’ is used for a deal size recalculation for indexes and CFD.