Article Library

1/44
Ranking
Forewords
This article is a first part of 3 part series of articles about strategy testing in customized JForex. I’d like to show to readers how JForex libraries can be easily used in building custom strategy trader/back tester. The idea behind my articles is, that when one needs to implement some more complex trading algorithm containing tenth or even hundreds of Java classes, requires some custom UI, needs opportunity to debug it would be beneficial to break free from JForex back tester and develop custom program using JForex libraries.
The article series presumes reader has got at least beginner knowledge level of Java programming language, basic familiarity of Java Development Kit, and ideally PowerShell scripting overview or at least working Windows knowledge.
Personally I’m very interested in area of automated / algorithmic trading and as a professional software developer having good command of several languages I’ve found JForex platform like the best option to develop automated strategies on. In this first article of the series I’d like to show you how to download all necessary libraries of JForex and use them in simple Strategy implementation.
II. Get JForex libraries
Read article
Translate to English Show original
CharmingRimma avatar

nice explanation

ak10 avatar
ak10 15 June

I have started developing strategy in Java. I will request you to post one blog or article for middle level strategy developers like me. Your article is new concept. Hope you win.

mcquak avatar
mcquak 15 June

@ak10 thanks. The 2nd part I'm working on now will be about using these jars we downloded in thi article in project in IntelliJ Idea hence having debugging features available, having JavaFX ui with simple observable currency pairs dashboard etc. Will host source code on github.

salamandra avatar
salamandra 17 June

very good

foreignexchange avatar

mcquak  Thx : )

orto leave comments
4/39
Ranking
IntroductionIn continuation of my last article where i've explained a strategy to export all orders to an external file to be analysed later, i have had other ideia using this one as the base to a new strategy. Imagine the following scenario: in our trading activity, we can't be always present over the trading platform. We need to get away from our system to do other works, maybe is lunch time or some family affairs must be completed or doing something else. When we get away, we leave some open orders running. When we came back to our platform some of this orders i've spoke before are closed by stop loss or take profit and we want to know what happened to these orders. One choice we have is to get over all corresponding order charts and look at them, but we only know at the best the pips won or losed (if we have "Show orders labels" on chart "Preferences"). We can also go over the web report pages to get the values, but we need to do some calculations to get the effective values in our currency (account currency). And some other calculations to get the winning or losing pips value, some more calculations to know the duration of the trade... until now. With the strategy i have desig…
Read article
Translate to English Show original
sircris avatar
sircris 7 Sep.

Excellent work, as I have already said these articles where there is a pre-development really contributes something to the community and your work will be useful for many people far beyond this month's contest. Very good idea the GUI interface.

jlongo avatar
jlongo 8 Sep.

Hi all... New release with a new column for "Order label" was released. Just download it again to have this column. Trade well. JL

LinnuxFX avatar
LinnuxFX 10 Sep.

Another great tool, I think Dukas should include something like that in the platform tools. MT4 has the history inside platform!!!

WallStreetBlog avatar

Very useful. Thank very much!!!

jezz avatar
jezz 25 Oct.

Likerty's right - make a manual, book, something. I've read your articles on the topic I'm not familiar with - well done

orto leave comments
1/34
Ranking
IntroductionOne of the things i miss at Dukascopy is the possibility to get relevant trader activity along the time in tabular or chart way. Sometimes, to get the data we want, we need to go over some pages and compile, extract and merge this information doing some tedious work. I know at this moment that a redesigned report area is coming soon, but this do not invalidate to make our way to get the information the way we want. In this article i will talk about a strategy i made to get the possible relevant information i want about all my submited orders, and i'm sure you will find it at least useful.The "MyGetOrders" strategyOn this article i don't talk about how i made this strategy because of all fundamental aspects used on it i talked before on previous articles. On this article i explain how to use it and what you can expect from it. What you need first, is to get the corresponding strategy file here and run it the usual way as any normal strategy. You will get the following parameter window:Image 1: This is the parameters window you will get when you start the strategy. Each item is explained below."Path and filename:" - Here you need to write the full path and file name where…
Read article
Translate to English Show original
jlongo avatar
jlongo 18 Aug.

Hi Dukascopy Community: One community member asked for the export file to have also the order label. I made a new strategy with option for order label you can get here -> http://goo.gl/f65N5M . Trade well. JL

jlongo avatar
jlongo 22 Aug.

Hi Dukascopy Community:

Other version released with minot bugs corrected and without the need to subscribe all instruments.

You can get it [url=http://goo.gl/Um3vd4]here[/url]

Trade well

JL

jlongo avatar
jlongo 22 Aug.

Sorry, link corrected: http://goo.gl/Um3vd4

jlongo avatar
jlongo 27 Aug.

@sircris: Thnk you for your comments. Your information was very useful. I know about other libraries with direct export to excel, but is good to know more possibilities. Trade well. JL

ahmedfathi23 avatar

hello
how can I get live data updated from jforex?

orto leave comments
4/38
Ranking
IntroductionOn last article we have done all needed prerequesites steps to be possible to interact with Twitter services with our future strategy. You can read the article here. With the strategy i describe on this article, as example, we will send to our Twitter account "tweets" as we had writed them on our Twitter client or web interface with some events that occurs inside JForex automatically with the values we want to send. In this case, the events i choose are order creation, order filled and order closed and all selected data related with this orders. This is only a example, but you can expand it to other ideias you might have. You can change it to act as a signal sender, level reached sender, indicator value reached, whatever you want limited only by your imagination and the "tweet" limit of 140 characters. Let's startAs we will use a external library as "interface" with Twitter to make our life easiest, some requesites are needed at start of our strategy code. The library i will use is "Twitter4J" and we need to load it inside our strategy with the annotation directive "@Library("Path to our library, path to other library needed, other more")". Also, as i don't like to use …
Read article
Translate to English Show original
geula4x avatar
geula4x 17 June

+1 Liked: high level of programming with good examples and source code! :-)

nilsaedagar avatar

+1 liked. completely different with better way.

B_Positive avatar
B_Positive 24 June

You are genuinely the most creative and open-minded person I have come across in this entire community as far as Jforex is concerned. You should be working at Dukascopy.. :)

jlongo avatar
jlongo 24 June

@B_Positive: Thank you for your kind words. My opinion, they are greater than i deserve. Trade well.

egidijus avatar
egidijus 27 June

Good article!

orto leave comments
4/33
Ranking
IntroductionI have changed the old series name to this new one, as at this moment it don't make too much sense to mantain it in my opinion... Also you need to check the new feature that Dukascopy Team created for us called "Visual JForex". This great tool will be a must for traders who want to create strategies but do not know about java programming as is almost a "drag and drop" tool. Several ways to interact with JForex are presented on my past articles, and now, on this first article of this new series, other way will be presented. Unfortunatly this type of strategy don't is possible to be created on Visual JForex yet.As traders, with good or bad results, sometimes we want to exchange our trading activity, our fellings or market activity with others based "DEMO" or "LIVE" accounts (on Contest we have the contest pages). This "share" of activity can be just for fun and for business too. There exist several ways to inform our "social" or "business" network in real time about all aspects referred before, but that will be a tedious task as we need to do the input manualy or create "tedious" reports made by hand. What if we can share almost all we can imagine automaticaly to our pub…
Read article
Translate to English Show original
Likerty avatar
Likerty 21 May

You could merge all your articles about creating strategy and write a book:) Did you thought about that?

jlongo avatar
jlongo 21 May

@Likerty: not at the moment. And to write a book something essential is needed: "time" and i think that the articles i made about don't deserve yet that possibility. Anyway, thanks for your kind words :) Trade well

egidijus avatar
egidijus 24 May

Good work.

scramble avatar
scramble 28 May

really another great work!

SpecialFX avatar

I don't even have a twitter account for now but I'm thinking of getting one, and hopefully one day integrate my strategy with it :)

orto leave comments
2/40
Ranking
IntroductionIn my last article i write about how to save JForex values to files, expecting this month to write about saving this values on database. But i need to find and test a simple database that can be used by the most part of our readers without to much settings, configurations et all and i haven't finished it yet. Because of that, i write in this article about sending emails from inside of JForex in reaction to some values or events we want to get informed about them. The information about this subject provided on Dukascopy Wiki is somewhat incomplete and not works "out of the box", because almost all e-mail providers changed the way we can send e-mails using their servers. The example provided on wiki works if you have a insecure smtp (Simple Mail Transfer Protocol) server, and actually this is not used by almost all e-mail providers to avoid spam and unauthorized access. The possibility of sending e-mails inside JForex with events, values or alerts is a good tool for the ones who can't be always looking the charts but want to be alerted when something occurs and have access to their e-mail. With this article you can build your strategy to send e-mails with text only. At t…
Read article
Translate to English Show original
scramble avatar
scramble 30 Mar.

nothing to say! great inputs as always! thanks :)

doctortyby avatar
doctortyby 31 Mar.

keep it up jose

DiamondCutter avatar

good stuff

isobitis avatar
isobitis 1 Apr.

Good work. Works in windows.
However in Linux it throws an exception
java.security.AccessControlException: access denied ("java.net.SocketPermission" "smtp.mail.yahoo.com" "resolve")

jlongo avatar
jlongo 1 Apr.

isobitis: it seems a problem with your Java permissions not allowing the socket utilization. See permissions policies.
Regards
JL

orto leave comments
2/51
Ranking
IntroductionIn first place i want to apologize the gap in time for my articles, but some personal problems prevented me from to have the time, the required concentration and patience to write them. In this article i try to talk about exporting JForex values we want to files on a textual manner for human readability or to CSV (comma separated values) to import them on other programs, for example Excel, Mathlab or any compatible program. Also you can import csv files directly on database. The ideia to this article came from my necessity to export some values for later analisys and use with other objectives without the need to be connected or doing tedious copy and paste of wanted values. In this article i will describe and exemplify all the process and obstacles faced during my learning process to achieve this. With this article you will be capable of extending it for other ideias you might have.The ideia...I need to loop by all available instruments to get some values from them. If we are doing this manually, that will be a tedious and time consuming task. For this article we assume we need the high, open, close, low, range and ATR values from monthly, weekly and daily periods of al…
Read article
Translate to English Show original
soon avatar
soon 20 Feb.

good luck

ecoplace avatar
ecoplace 21 Feb.

good luck , good articl more chance to you

fprophet avatar
fprophet 21 Feb.

I get errors trying to write to file on my Demo account:

with @RequiresFullAccess set:
Error creating or accessing the file: exportdata.txt (Access is denied)

without @RequiresFullAccess set:
Error creating or accessing the file: access denied (java.io.FilePermission exportdata.txt write)

I have tried various file path-names, without luck
Any thoughts on how to fix this?

fprophet avatar
fprophet 21 Feb.

ok - I figured out that the file has to already exist - this strategy code doesn't appear to be able to create the file ....

jlongo avatar
jlongo 22 Feb.

@fprophet; The strategy create a file if not exist (i tested in windows and linux)... may be any restriction on your filesystem that not allow the creation at the path (UAC of windows can be a reason). The directory reffered must exist. Anyway, to be sure you can change the path to your home directory or use IContext.getFilesDir() + "/filename.txt" to create the file at your home directory or at ".../JForex/Strategies/Files/". I hope that helps. Trade well. JL

orto leave comments
1/28
Ranking
IntroductionIn last article i presented a strategy called “MyOfflineTrades” that allow us to do manual trading on Historical Tester. I have described all steps needed to use it and how to use it. Now i will try to explain how i have developed it and you can use this knowledge to extend or to use it on other projects. I tried to make it in the simplest way i can, maybe some code can be developed in some more efficient ways.MyOfflineTradesOne of first dilemas i faced was to decide how i integrate the form of the strategy on the strategy itself. We have two solutions for that: one as external java source file and import the corresponding class or jar file by calling it as external file. But this approach can create some problems to some users using it. Other solution is to use inner classes and develop the form class inside the strategy itself. This project is a simple one, just a few classes and not too large in code. This way i decided by this second approach and this way i don't need to provide more files than the strategy file itself. The only disavantage is working all the code on only one java file (not advisable to use on large projects). Bellow a snipet code how to do that. Im…
Read article
Translate to English Show original
jlongo avatar
jlongo 6 Nov.

@SpecialFX: yes, netbeans is free, also other ide software as eclipse. I think Dukascopy development use the last one.

LinnuxFX avatar
LinnuxFX 15 Nov.

Helpful tool, hope it help improve your trading skills...

jlongo avatar
jlongo 24 Nov.

Hi Dukascopy Community: I released a new version of this strategy with a small improvement. You can get it at the forum thread at first post... More improvements to come later. Trade well and prosper in your way. JL

doctortyby avatar
doctortyby 25 Nov.

Keep improving the Coding and the Writing Style dear Jose, I appreciate your efforts very much. You should even start your own mentorship progam here on Dukascopy LIVE Tv :) Don't mind the language barrier

jlongo avatar
jlongo 25 Nov.

@"Doc":Thank you as always for your kind words. The language barrier, i think i can get there but for that i need to practice... Unfortunatly i don't have much time available for that.
Have a nice weekend!

orto leave comments
1/68
Ranking
If you have read my last articles, you began to see some intentional order in them. The content of the last articles may help in our learning path. In them we see the easiest way to start of JForex, and how to see or get logs of JForex errors as well as how to avoid them in some extent. We all are JForex users, ones only using it to do the trading process, others, who want to know what happens behind the scenes and maybe help to build that scenes. In this article i begin to discuss some of the most interessing things in JForex: the possibility to extend it to do what we want. For that we need to use JForex API. Most of us know the indicator "WSMTIME - World Stock Market Time" or the modified version "MARKET HOURS". I began to use WSMTIME, but i don't need all markets there. Because of that i use "MARKET HOURS". In this indicators, i find anoying when i try to analyse (if we can talk that way ) higher timeframes i get all the chart with a rainbow of colors and is hard too see the bars itself (i know i can adjust opacity to avoid this in some extent). Other thing i think is lacking, is the need to know how long it take to open or close a choosen market and if possible get some defin…
Read article
Translate to English Show original
kkforex avatar
kkforex 12 Apr.

Nice code for building an GUI 1+

cristina avatar
cristina 19 Apr.

For the ones who trade open/close markets it will be a usefull indicator. Keep it on

jlongo avatar
jlongo 21 Apr.

Hi all
I have created a thread in Dukascopy forum to see if more persons get interessed and to post there the evolutions of the project. The link is -> http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=7&t=47179 .
Trade well and good luck
JL

jlongo avatar
jlongo 24 Apr.

A working version (with some limitations) is posted at the forum... follow the link in my last comment. Trade well and good luck.

LinnuxFX avatar
LinnuxFX 25 Apr.

Well done, great computing skills, I will try it...

orto leave comments