1. Overview

As I described in my previous article Analysis of Strategy Based on Correlation (part 1) my idea is to detect situations in market when major pairs usually moves in some certain intervals and to run strategy which catches movements inside mentioned intervals in three different pairs - EUR/USD, GBP/USD and EUR/GBP. As at year start where were quite big movements related with faded expectations for sooner than later GBP rate hike, SNB floor removal and ECB QE announcement I think presently pairs might find new fluctuation ranges not going so sharply to one direction as was at the year start. That's why I decided that presently is good time for further analysis of pairs correlation strategy and testing it in demo jforex environment. In this publication further development of strategies for GBP/USD and EUR/GBP pairs will be described (strategy for EUR/USD was described in previous publication) as well as real launch of all three pairs strategies in demo environment.

2. Strategy for EUR/GBP

Not going to deeply to visual jforex programming issues I will explain main principles of strategy prepared for working in EUR/GBP pair. Strategy layout is presented below:



Here is presented main logic of the strategy. Principle of strategy is to collect all open position by means of Position Viewer block and calculating number of positions and cumulative P/L of positions. As according to strategy specification in EUR/GBP pair short positions are opened in strategy logic only short positions are counted. This is done by adding +1 to numbershort variable each time when short position is detected by Position Viewer block. Later on before logic is run after next candle arrives this variable will be st to 0. Similar cumulative P/L is counted. Every time when position is detected P/L of individual position is added to variable plshort thus calculating cumulative value of all short positions.
Later on triggersh variable is calculated. For this Calculation Expression block is used and mentioned variable value is calculated by formula:
0-(A1+(A2-1)*24), where A1 - 48, A2 - numbershort. Constant 24 is half of 48, which is take profit for position and trigger for opening another position is rate goes against position direction.
Purpose of this formula is to find trigger for opening of new position. This trigger is compared with average all position P/L and if average P/L, which is represented in strategy logic by variable avplshort, is less than mentioned trigger new position is opened. Such logic is applied if number of open positions is greater than 0. If there is no open position at the moment strategy logic simply opens new position without any comparisons.
That's main principles according to which strategy is working.

3. Strategy for GBP/USD

Principles of strategy prepared for GBP/USD is actually the same as for EUR/GBP so I will not go through it once more. All strategies after development in visual j forex were compiled and loded to demo jforex platform.



For fetching of source code from visual jforex platform after choosing Compiler - Build and going to the right side of the screen Strategies - My Strategies should be selected. Later on developed strategy in this case for GBP/USD need to be selected right clicked and View Source option selected. After doing so source code appears in separate window and by selecting copying and pasting it to jforex platform strategy editor it could be later on compiled from there and run.

4. Historical testing of strategies

In order to be sure of strategies performances according to specification I ran historical test for December, 2014. Firstly I tested strategy for GBP/USD pair.



Strategy worked according to specification and produced P/L of +84 USD.

Later on strategy for EUR/GBP was loaded and tested in the system.


Everything went smoothly also and strategy also produced positive P/L of +103 USD.

And last strategy to be tested was EUR/USD strategy.


Profit of +222 USD was booked.

Thus all test showed that all three strategies worked as was intended.


5. Putting strategies together for real time testing

Of course historical test is one thing and real test another. That's why I think it is very important to test strategy in real time environment. For testing I decided to use my Dukat trading platform. At the time of running strategies my Dukat platform balance was at 1988 USD.


As can be seen from picture all strategies are running but as it were started on Saturday there is no opened trades yet.
As I do not plan make further transfers to Dukat platform during this quarter this platform will be ideal for mentioned strategy testing for remainder of January, February and March.

6. Further steps

I plan to leave strategy in testing phase for at least two months. Such testing I think will show drawbacks of strategy and expose possible development areas. I will provide updates of strategy performance in article comments. So good luck for strategy (or three strategies running at the same time).
During months dedicated to testing I will collect information of strategy performance and plan to come with possible improvements in coming publications.
Translate to English Show original