Tree [r38] /
History



File Date Author Commit
classes 2010-08-17 cedricbb [r32] Two more small fixes
sources 2011-06-07 cedricbb [r37] Version 2.052
Readme.txt 2011-06-07 cedricbb [r38] Version 2.052
ReleaseNotes.txt 2011-06-07 cedricbb [r38] Version 2.052

Read Me

MT4 JForex Clients Bridge
 *  project website:             http://sourceforge.net/projects/mt4dukabridge/
 *  project website on google:   http://code.google.com/p/mt4jforexbridge/
 *  video tutorial:              http://www.dukascopy.com/swiss/english/forex/jforex/forum/download/file.php?id=178
 *  pdf tutorial:                http://www.dukascopy.com/swiss/english/forex/jforex/forum/download/file.php?id=179
 *  youtube tutorial (1.08 ver): http://www.youtube.com/watch?v=DTjEU4Nt1V8
Created by Cedric Breitenbach, cedric.breitenbach@yahoo.co.uk

This product includes:
- source of plugin: MT4JForexClientsBridge.java
- compiled plugin: MT4JForexClientsBridge.jfx


MT4 JForex Clients Bridge Overview and Tutorial

There is a great solution for those who want to trade using the Dukascopy JForex platform whilst taking advantage
of the MetaTrader interface and its expert advisors. MT4-JForex Clients Bridge - is a simple plug-in
 for the Dukascopy JForex platform. It transfers the trading signals from the Metatrader platform to JForex,
 receives notifications from MetaTrader log file and executes the transferred trading signals.
Generating new trading signals (Instant Execution, Market Order or Pending Order), MetaTrader will log it into the file 
(format YYYYmmdd.log), located in the logs directory where MetaTrader is installed. For JForex this bridge is a
 standard strategy which reads logs and transfers the trading signals to the JForex platform. JForex users can set
 up these signals for an automatic execution. 
Orders modification, close and pending orders delete is supported by MT4-JForex Clients Bridge from version 1.2.If a user
 modify or close his orders - plugin trace it and do the same with orders opened in Dukascopy JForex platform.

How it works, step by step: 
 
1.	To get the bridge, please download the latest version of ‘MT4JForexClientsBridge.zip ' 
	from  https://sourceforge.net/projects/mt4dukabridge/files/ 
2.	Unpack the zip archive and copy MT4JForexClientsBridge.java file into ~/My Documents/My Strategies/ folder.
	This is a default folder where JForex platform will search for the strategies.	 
3.	Run the JForex and MetaTrader platfroms.
4. 	In the JForex platform, please subscribe to all instruments you would like to trade. Then select “Strategies” 
	tree node in the “Workspace” menu tree. Then right click on it, for “Open Strategy”:
5.	If your previous steps were successful, you will find the MT4JForexClientsBridge.java file in ~/My Strategies.	   
6. 	JForex platform will open the strategy with its editor. Now you can compile it.
	If the installation was successful, please run the strategy by pressing the “Run” button in the “Strategies” tree 
	(you will be asked to accept the disclaimer before the strategy start).
7.    After the strategy launch you will see the “Define Parameters” window where you have to define the MetaTrader log
	 file for the current day (you can find it in the “logs” directory where MetaTrader was installed). Then please 
	define a slippage for the orders and the lot amounts format difference between MetaTrader and JForex platforms.
	 In MetaTrader 1 lot is equal to 100 000 but in Dukascopy 1 lot is equal to 1 000 000. So, by default the value 
	should be equal to 0.1 – meaning that 1 MetaTrader lot = 0.1 JForex lot. Then press the “Run” button.
8.    In JForex platform you will see the opened tab "MT4-JForex Client's Bridge" with two tables:
	The first table displays the traced orders from MetaTrader. The second table displays transferred trading signals from
	 the first table. If you want to execute automatically trading signals from MetaTrader, please select “Execute”
	 radiobutton.
9.    If you want to stop signals execution in JForex from MetaTrader just select "Monitor" radiobutton.
10. 	From version 1.7 - added the new checkbox - "Execute only by MetaTrader Approve". Ussually bridge creates orders in JForex, when user or strategy
	in MetaTrader asks for action (open, close or whatever). With this option bridge starts listen only already created orders with 
	MetaTrader approve. With this case - the order transfer will be more slow, due to delay from MetaTrader server.
11.	From version 1.9 - new option is added - "Force Execution" (Whatever price - all orders become as limit orders 
	to open and close). This feature create any order as MIT order and close orders by setting the stoploss or takeprofit at 200 pips,
	in this case the order can be executed by the worse price, but if the order is rejected by JForex - it will try to execute 
	again and again (continues execution, 15-30 tryings).
12.	From version 1.16 - is possible to limit the work of the bridge - with the max opened Orders and use of Leverage in percents.
13.	If you have the problems with Windows Vista or Windows 7 - if the bridge doesnt work - seems that problem in installed directory of MetaTrader.
		Windows prohibits bridge access to the MetaTrader logs. To avoid it - please reinstall the MetaTrader client - NOT to the "Program Files",
		but to the user created directory. For example : "C:/MetaTraders/DukascopyMetaTrader"



Hints:
1)	If you use “MT4JForexClientsBridge.java” strategy very frequently you can hard-core the path to your file (see the code
	 for an example).
2)	If MetaTrader and JForex - instruments - have different "Pips" size, at this case - the new method is added 
	"getRoundedPrice(Instrument instrument, double price)".
3)    If you would like to execute only signals (Instant Execution) by equal or better price in JForex, then you can 
	use the checkbox in Plugin "Execute at Equal or Better Price". Also you can define the "Pips Amount Difference" for this 
	purpose. If you define zero, than means that price can be equal to MetaTrader price, if you define 2, that means that price in JForex
	must be better by 2 pips than the price in MetaTrader.
4)	Market Orders have price 0, due to that The Price at trade moment is unknown. That's why "Execute at Equal or Better Price" will
	not works with Market Orders. This feature works only with Instant Execution and Pending Orders (where the price is known).
5)	"Requoted" Signals are ignored by plugin, only first one signal go to JForex. It is done from preventing of numerous signals in
	JForex and becouse "Requoted" signals is dependable from MetaTrader broker.
6)	From version 1.6 the the "bridge.log" file automatically created in the folder, where MetaTrader log file was uploaded. You can find log 
	information about bridge work. For better response is better to delete sometimes this log file.
7)	From version 1.8 - is added instrument prefixes check - due to that some MetaTrader brokers - set to instrument their prefix. 
	This check allows to work with those "custom" instruments.
8)	From version 1.8 - the bridge supports partial orders execution.
9)	From version 1.18 - is added new feature to Parameters - Minimum Lot Amount check, if user check this option - all trades,
	 less than 0.1 lot size will be set as 0.1 lot size - Dukascopy minimum lot size. This feature for advanced users.
10) 	From version 2.01 - new features are added, restore orders connection with MetaTrader, after the bridge or platform restart.
	Also the check for bridge work duration is added and check for max order amount also is added as "Advanced settings".
11)   From version 2.052 - is added standalone version - which is possible to launch with JForex standalone api.