Article Library

In this article, we will talk about the general requirements for profitable trading systems. The article consists of the following topics:
  1. Creating a logical and symmetric trading algorithm.
  2. Getting the high quality history data.
  3. Backtesting of the system.
  4. Optimization.
  5. Forward testing.
Read article
Translate to English Show original
NAG avatar
NAG 9 Sep.

сколько информации))мой переводчик чуть не взорвался))класссссссс!!!!

ElizavetaKl avatar


Illya avatar
Illya 10 Sep.

Nadin5794  Примерно все так и есть! Особенно когда ты трейдер со стажем!))) Но новичку нужен алгоритм действия! Иначе ему придется пройти поле граблей самому! Куда проще усвоить простые и понятные правила, когда они уже обличены в руководство к действию!)

AloneVolf avatar
AloneVolf 13 Sep.

Отличная статья для новичков. Полностью согласен. Только я бы сделал акцент на обязательности живого тестирования, которым многие (да и я в начале) пренебрегают. Так же просьба к автору по возможности давать статью и на языке оригинала. Думаю не все ее поймут на английском

Illya avatar
Illya 13 Sep.

AloneVolf  Спасибо за отзыв! кстати ссылка на переведенную статью

orto leave comments
Hi Friends,
This time I have decided to share with you all, a method to develop Automated strategy in JForex platform.

Dukascopy offers us various opportunities to grow and strategy development means automated trading is one of them. I believe that if we make combination of manual plus automated trading can increase winning ratio in trade. My personal experience says there are many benefits of designing and developing strategies. In the process of designing strategy and increase its success rate I keeps trying various combinations of indicators. And in the process my manual trading is also improving. Because what looks good on chart may not go well in automated trading, and things which we haven't imagine can work well in automated trading. So, when we keep trying I am sure we can get a combination of indicators which will be highly successful. Another benefit is associated with is test run of strategy using historical tester gives us insight about reliability of strategy as well as reliability of indicators used. If you test run strategy for 2-3 years you will get idea about conditions where strategy will work and where it will fail. This guides us when to enter into trade and wh
Read article
Translate to English Show original
Lowech avatar
Lowech 19 June


Aviator avatar
Aviator 29 June

well done

anna_n avatar
anna_n 23 Nov.

very useful info! thanks!

Lovely_bee avatar
Lovely_bee 28 Nov.

very good work

Sebine avatar
Sebine 5 Dec.


orto leave comments


In a 4×100-metre relay race, one runner starts before the other, but in the end it’s the sum of the four runners that determines performance.
This is what automated forex trading is all about, where different indicators are combined to work together in the execution of the trades. The final outcome is more important than the results of the individual components, that is, in a strategy with 3 indicators all indicators have to point to the same thing for a trade to be consummated.
This article is about creating an automated trading strategy using three indicators, namely MACD, Aroon and the Alligator indicators using vjforex. This is a strategy that I have planned to employ in the November and December 2017 Dukascopy Strategy Contest.
Candle Instrument
Candle Period
15 Min
Fig 1: Candle instrument and period
By using the default instrument and default period settings it will become easier to investigate how different currency pairs and time frames impact the strategy.
Open Positions

According to the trading rules of the strategy contest, the maximum amount of simultaneously opened positions is one and any further requests to open a new position will be re…
Read article
Translate to English Show original
fex avatar
fex 24 Nov.

отличная статья!

TforT avatar
TforT 24 Nov.

Well done .

Uladzimir avatar
Uladzimir 24 Nov.

good joob

BIGBO avatar
BIGBO 24 Nov.


kish avatar
kish 1 Dec.

хорошая статья

orto leave comments

One of the main problems of investing in the Forex market is that we are humans (and among other things subject to emotions) and not computers programmed to execute instructions. However, despite all the advantages of automation, it is not enough to simply codify the strategy that we already execute manually. It is necessary to automate following some good practices. This article intends to present the golden rules for having consistent medium and long term gains in Forex.

The Golden Rules to build a profit Automated Strategy:

Read article
Translate to English Show original
jcardoso avatar
jcardoso 25 Feb.

well done ;) Sometimes I'm using the stop loss but in some situations I prefer don't use and let the market run

jorgepaula avatar
jorgepaula 25 Feb.

Good work. I prefer manual traiding and I have some doubts about the performance of automated strategies ;)

antoniogreenblue avatar

Hi Margarida, with martingale strategy we need more attention with Risk Management. I'm not using much the Martingale...

antoniogreenblue avatar

Hi jorgepaula the automated is only a tool.... we need a good strategy in both manual or automated ;)


nice article

orto leave comments
In my recent articles I was focusing on strategy hypotheses checking and strategies paper-trading in R. So all of these activities with so much of development effort in it bring a valid question. Is there any value in such backtesting and hypothesis checking? My answer is definitely yes, and I'm going try to persuade you about it.
Why doing back test in R when my strategy runs in Java/JForex?
This is valid question. Why anyone would be bothering writing thousand lines of code without any possible reuse?
First of all R is good for quick strategy prototyping. Before we would be bothering to write single line of code in Java, it's better to assure that our strategy is profitable. And R is very good tool for it. Ok, fair enough so far. However this would lead us to justified worries about rewriting whole strategy that we potentially have in R to Java. This could be potentially quite big issue since libraries we are used to use in R usually do not have their opposite siblings in Java world. So my personal intention about strategies being written in R is to be able to reuse as much from the code base in R as possible. How?
Reuse R code in Java/JForex? Use Renjin!

When I was starting inv…
Read article
Translate to English Show original
mg64ve avatar
mg64ve 26 Dec.

Dear mcquack, I have tried to implement the R-Java integration as per your article.
I am not using IntelliJ, I am using JForex.
I successfully installed rJava in R and modified the path in Linux.
Unfortunately, if I try to compile your strategy I get:

14:17:32 The import org.rosuda cannot be resolved

Do you have an idea where JRI.jar has to be copied?

cbennici avatar
cbennici 7 Jan.

hi mcquak.

I've  installed properly Rjava and  load the library: '@Library ("C: /Users/calog/JForex/libs/demo_3/3.0.15/JRI.jar")'. The strategy compiles regularly.
At a time when initializing the Rengine "Rengine re = new Rengine (new String []  {" - no - save "}, false, null);" is executed  the platform closes unexpectedly without saving anything.

Rjava under JForex have been tested under Windows 10?

mcquak avatar
mcquak 7 Jan.

cbennici, I've made tests under Windows 7, but it's definitely not a problem.
I did not use standard JForex platform for testing but I used my own local tester built up from JForex .jars so I could  run and debug whole platform from within IntelliJ Idea (which is great for debugging purposes).
I guess for R to be callable from standard JForex platform, you'd need to made some changes in the strategy. If I'm not mistaken there is some metadata attribute that allows to import/reference jars in the platform (see screenshot).

mcquak avatar
mcquak 7 Jan.

mcquak avatar
mcquak 7 Jan.

mg64ve Hi, pls see my 2nd post above, it's perhpas tha same problem. For using/referencing external jars in JForex you'll need to reference them via metadata attributes. @RequiresFullAccess and @Library("PATH_TO_JAR").

orto leave comments

Poseidon is an offspring of famous Donchian Channel and Turtle Trading Strategies first introduced in Poseidon Strategy Rules and Test Results (1 March 2013). It is a trend following strategy aiming to capture a trend and not letting it go until trend fades.
The rules are simple and can be found in above mentioned article in detail. Shortly, it enters the market when 55 days’ highest or lowest value is breached. It has a initial stop loss and trailing stop depending on the ATR value of currency pair.
You can find test results of optimization of ATR values and proof that Poseidon works with wide range of stop loss and trailing stop values in Simple Money Management and Poseidon Test Results Revisited (1 April 2013). Also why I believe risking certain percentage of your equity is better than using fixed amount per trade explained in the same article.
I re-introduced my own system with my simplified rules in Poseidon Makes 50.000 $ to 360.000$ - Jforex Files Included (7 July 2016). I removed ATR calculation for every trade and started use fix amounts…
Read article
Translate to English Show original
Efegen avatar
Efegen 28 Aug.

Thank you everyone for your support :)

driven avatar
driven 28 Aug.

Nicely done.

Sharpshooter avatar

Хорошая стратегия, но не каждый сможет следовать ей. Спасибо за материал.

fxsurprise8 avatar

great article as always!

Ninnell avatar
Ninnell 21 Sep.

great article))

orto leave comments
This article is about the ‘tool’ I developed for JForex which will allow to link some or all of your charts to a main one, and switch the selected instrument in all of them in just one click.
How to setup
Save the .jfx file on your preferred C://...//Strategies folder and play in Local Run. Before playing the code, click on the chart where you desire having all commands. In this article’s example the GBP USD 30 Minutes will be our main chart:
Once hit the PLAY button, there will be the possibility to set few parameters through the ‘Define Parameters Window’. Consider the following picture:
Once hit the Run button, the code will load a very small widget on the main chart and a red “dot” on every open chart. See the picture:
1 - How to link 1 or more charts
The red dot is mouse-event sensitive: a double click will link the chart and another double click to un-link it back. If the chart is linked, the dot will be automatically drawn in green color. Consider the following picture:
2 - How to switch Instrument
The widget will load the previously selected instruments in the left-to-right order, so the first button after the switch button (explained in next paragraph), will b…
Read article
Translate to English Show original

análise perfeita! condizente com o mercado e muito bem feita e avaliada!

Durden avatar
Durden 30 Nov.

Grazie Scramble

kiria avatar
kiria 10 Feb.

very interesting

campione avatar
campione 21 Apr.

Dear developer, could you tell me how can I add more currency pairs to this? shall I edit the .jfx file to do this? how and where can I edit .jfx files? by which app?

scramble avatar
scramble 24 Apr.

Do you mean adding more buttons? You cannot modify the jfx file.... You should modify the java file but is not published

orto leave comments
Automated systems (e.g. Jforex Strategies) with all its advantages and disadvantages are more than an alternative increasingly used in relation to manual trading. However, the market is increasingly dynamic and is increasingly difficult to apply the patterns of the past. What is proposed in this article is the presentation of a hybrid approach to automatic trading strategies which can work independently or can be adjusted their algorithms whenever necessary in real time. The trader in the hybrid trading assumes the role of coach.

1- What is Hybrid trading

The Automated Systems (also known as EAs) are applications that implement a certain algorithm reflecting a negotiation strategy that allows operations to be executed without the need of human intervention.
Computers have many advantages as opposed to human intervention. They fulfill to the limit the defined strategy being totally rid of emotions and hesitations where sometimes a few seconds can make all the difference in taking investment decisions.
A hybrid system is an automated trading which can be adjusted in real time whenever needed. The trading is becoming more dynamic and little bit away from patterns analysis…
Read article
Translate to English Show original
antoniogreenblue avatar

For now I’m building a “web page” to submit the real time trader instructions to the Strategy and after I hope to build the trader interface inside the jforex platform.  Thanks for your comment ;)

fx_lmcap avatar
fx_lmcap 3 Mar.

Artigo Muito Bom! Ideia bem explicada!

tdbatinkov avatar

interesting Ideas.. well done

LinnuxFX avatar
LinnuxFX 8 Mar.

Bom projecto, é sempre bom ter em conta os 2 tipos de trading: Manual e Automático, neste caso automático com instruções manuais em real time!

Nihad avatar
Nihad 11 Mar.

Different. Good luck

orto leave comments
At about 08.00 GMT, Saturday the 9th of January 2016, when I was reading one of the article posted here. I discovered once again how, many traders are so obsessed with creating strategies that they presume will make them profits in the market accurately and consistently.
Towards the end of the reading, these where the authors own words, may I ask permission to quote it “This whole process taught me the importance of considering large time frames during my trading analysis, and also the fact that automated strategies will never to totally reliable because they lack the human intellect to consider real-time fundamental changes in the market”.
This trader is not only correct, but did demonstrate from the statement above that she understands market price dynamics.
Granted, every forex trader wants to make profit. The old trader feels very badly when he sees he still get trade losses and the newbie trader becomes even more nervous and don’t want to get losses. In this article I want to remind the older trader and show the newbie traders what works, don’t quote me wrong, for some it works for them – understand my personal trading secrets am about to reveal for the first time
Read article
Translate to English Show original
Margoshka avatar
Margoshka 19 Jan.


Natalia_Kisenko avatar

great article!

Olkiss70 avatar
Olkiss70 31 Jan.

useful work

BeautybyLesya avatar

good article!

Skif avatar
Skif 11 Feb.

цікава думка щодо торгівлі !

orto leave comments


Uma das regras de ouro da negociação em Forex é conhecer-se a si mesmo. Conseguir ter um bom controlo emocional sabendo resistir à tentação de fechar uma ordem cedo demais (não lucrando o que podia lucrar) ou fechar uma ordem tarde demais (perdendo muito mais do que devia perder). Neste artigo vamos falar sobre a vantagem de fazer uma pausa e porque não tomar um bom café.

O estereótipo do trade de Forex:
Existe um grande mito nos mercados financeiros e principalmente no mercado forex, o qual diz que um Trader deve fazer várias operações por dia e se dedicar ao mercado integralmente. É muito comum ouvirmos histórias de que para ser um bom trader é necessário acompanhar o mercado muitas horas por dia fazendo bastantes ajustes dos nossos valores de take profit e stop loss praticamente sem fazer pausas e sem tomar um saboroso café.
O que podemos fazer:

1) Automatizar as nossas negociações:
Os Sistemas automatizados (também chamados de EAs) são aplicações que implementam um determinado algoritmo que reflete uma estratégia de negociação que permite realizar operações sem a necessidade da intervenção humana. Os computadores têm inúmeras vantagens em relação à intervenç…
Read article
Translate to English Show original
VictoriaVika avatar

Insightful - very well done! A brilliant article. Inspiring! Many useful information, informative and helpful, also there are some useful tools introduced, thank you. Victoria

orto leave comments
It won't come as a surprise to many of the readers that modern machine learning techniques can yield significant benefit in crafting automated trading strategies. In fact, any FX trader with solid math background will agree that an automated trading strategy is itself a 'model', whether machine or human learning was used to construct it. This is why it makes sense to borrow and introduce some concepts from this popular branch of modern computer science, and discuss how they might apply to Forex trading.
For our purposes, we can define a model as follows: a mathematical function or formula that takes in a set amount of data (which can be your indicators for example) and produces an output. A trading strategy is one such model. Contrary to machine learning however, we are human learners that use trial and error to come up with a good model for trading currencies. It makes sense that we can learn a few tricks from how machines learn their models, and apply those learnings in Forex for greater return.
Learning a model, for machines, works by running a set of pattern recognition algorithms on a set of data. The data can be anything, ranging from images, music and even financial data. Th…
Read article
Translate to English Show original
orto leave comments

When most people discover the forex market for the first time, one of the things that come with this discovery is the “magical” phenomenon called “Expert Advisors” or “Forex Robots”. In truth, there is nothing magical about expert advisors; they are simply computer programs that have the ability to execute trades without the need for human intervention.
For traders using a Meta-Trader platform, these programs are called expert advisors, while the more general name for them is forex robots. Although over time, most forex brokers have provided platform tools that can be used in the easy development of forex robots on their platforms.
An example of such is the Visual Jforex strategy builder used in the Dukascopy community.
Some people refer to this type of trading as Algorithmic Algo trading, mechanical trading or automated trading using forex robots. With this type of trading, a specific set of entry and exit trading rules are coded into computer software; and this allows the software or program to execute trades automatically via a computer.
There are four main reasons why most people would opt to use a forex robot, rather than employ a human trader.
The Absence of Emotions
Read article
Translate to English Show original
Likerty avatar
Likerty 20 Feb.

good extensive explanation!

missanzhelika avatar

Robots will take over.. eventually..

SalviLeana avatar
SalviLeana 21 Feb.

great job !! :) well done

Agnessa26 avatar
Agnessa26 21 Feb.

Мне очень понравилась ваша работы !! Вы молодец

Airmike avatar
Airmike 22 Feb.

nice article

orto leave comments
Before continuing I would reccomend to read the previous steps where I explained the bases and some core concepts. You can find them following these links: part 1 here and part 2 here.
The fourth element

The concept is always the same: everything has a clear (eventually complex) function but has to be as much simple as possible. At this stage I'm going to implement the order engine, so meaning the whole code structure that allows to open positions in the given instrument.
As I already explained, any MA-based strategy is definetly not stable: always ends with an overall losing result, no matter what timeframe or instrument, but in the same time there are really good opportunities happening in particular conditions.
To simplify and improve my trade decisions, I need the maximum amount of informations and commands in the same chart so I found useful to sligthly modify a simple tool found in the Strategy API: the widget.
Chart widget
What triggered in my mind this idea is simple: since the full automation doesn't work (for this MA-based strategy), I will execute the trades manually, but I wa
Read article
Translate to English Show original
scramble avatar
scramble 19 Feb.

Actually, I had to remove the downloadable .java because I noticed there is something wrong with order execution. It works on strategy test, but does not work in real mode! Quite strange indeed.... will check out, and eventually post it on comments after I fix the issue :/

scramble avatar
scramble 19 Feb.

Of course.... if anyone has a suggestion will be much appreciated!! Thank you :)

scramble avatar
scramble 19 Feb.

Ok fixed. I thought it wasn't necessary to pass on te IOrder. I was following my idea based on previous strategy which was built in ITick.

scramble avatar
scramble 19 Feb.

I take the opportunity to modify some parts and implement the code to make it work better. I will probably finish before contest expiry date, so will publish everything on last article (just a quick review). Eventually if someone wants the code, I will put it available again. Thank you

orto leave comments
This is in continuation of previous article published on 4th February, where I exposed how the Linear Regression Slope indicator can be used to collect many informations in one single data outcome (indicator positive or negative) when used in m15 timeframe, with 96 time periods.
The second element

Before going to explain this step, I have to explain deeper the first one, showing a clear example of what happens in a daily chart and how I read it in the 15min timeframe.
In the following picture we see the EUR/AUD instrument in daily timeframe. Starting from the beginning of 2014, price was showing some attempts to keep rising and resume the previous uptrend, but as we see there was a strong reversal down with a full 2 days downward. This was due because of strong fundamental change, came near important resistance area.
Looking at this scenario in the 15m timeframe I have much more to say, see the chart:
When the new year was open, price immediatly came back down near 2013 close, showing a quick bounce reconquering the eMA65 and giving a further 50pips continuation to the upside (indeed strategy's purpose is to get maximum 40-45pips each trade). But the overall situation is
Read article
Translate to English Show original
Skif avatar
Skif 12 Feb.

Хорошее продолжение вашей первой статьи !!!

scramble avatar
scramble 12 Feb.

Thank you Skif :)

rokasltu avatar
rokasltu 17 Feb.

Very interesting. I try to do similar things but concentrating on long term run for now

orto leave comments
  INTRODUCTION   With the new year start, I began learning the JForex strategy coding (in java). Within one week of study, I've came to a conclusion that JForex is much more powerful coding language than MQ4 and other automated trading strategy we see around us. Being based on Java, the code is not only reliable and prevents lot of execution errors with efficient handling of exceptions before first run, as well the strategy is platform independent. The servers and technology infrastructure installed by Dukascopy also have reliability. On top of all this, the upcoming facility of running your strategy next to Dukascopy's trading servers in Switzerland makes the life of scalper, high frequency trader a lot easier and profitable! See my audio related to server co-location here.I've figured out that the JForex Wiki, the API Docs and Dukascopy Forum has immense knowledge about JForex strategy coding, if one takes out time for learning and testing out the logic. Henceforth I'd like to present a showcase of my experiences with JForex Strategy coding. The support given by Dukascopy on Forum is exceptional and terrific.The JForex EdgeMost people are said to lose out in trading. And it's com…
Read article
Translate to English Show original
ritesh avatar
ritesh 21 Jan.

@TinkTank: Thank you for the review. This article is exactly 1 word short of max limit of 1500 words, so I had to explain the brief about my experiences with coding. Major help came from Dukascopy Coding Support Team at Forum. I can only say that, make logic for code (algorithm) and then code the logic.

kkforex avatar
kkforex 23 Jan.

I guess this is similar to Boris Schlossberg's method of BB trading.

ritesh avatar
ritesh 23 Jan.

I don't know about Boris's BBands strategy. He's a professional trader and his code would surely have higher expectancy.

Andre_NL avatar
Andre_NL 9 Mar.

The Jfx code
Download the present version of Bollinger Bands  <<----

this link is not working like it supposed to.

ritesh avatar
ritesh 7 July

Andre_NL: Your account is dormant, how to share the code?

orto leave comments