Strategies based on stochastics

In the 60th issue of ForTrader.org we will look at another simple trading system. Some people will probably reproach us for not having learned from our previous experiments not to turn to simple trading tactics. To some extent, they will be right, but we chose this copy because it uses a favorite of many traders. Stohastic Oscillator indicatorIn addition, it is the only one that is taken into account. It would seem that what else can be invented with this tool - the market has already accepted or denied everything that can be done, but this time we will not just determine the upward and downward movement on the chart, but try to play it correctly, taking into account all the nuances of Stochastic.

We should also note that this tactic was suggested to us by forum participant q3-star. Его главным аргументом в пользу стратегии стал тот факт, что он активно ее использует, в том числе и в конкурсах трейдеров, проводимых брокерами и дц, кроме того, по его словам, она дает прибыль в размере 3-15% в месяц. По первым ощущениям — неплохо, давайте пробовать.

Basic rules

As it is not difficult to assume, the strategy is based on the Stochastic's ability to determine the trend quite well. It should also be noted that the main direction of movement will be viewed on the daily chart, while operations are performed on the hourly chart only in the direction of the formed long-term trend.

1.    Purchase order выставляем при следующих условиях: на дневном графике Стохастик показывает восходящее направление, на часовом графике — пересечение линией K (быстрый Stochastic(shown in blue in Figure 1) of level 30 from bottom to top.
2.    Warrant of sale set under opposite conditions: on the daily chart Stochastic shows downward movement, on the hourly chart we are waiting for the K line to cross the level 70 from top to bottom.
3.    StopLoss is set at the local extrema of the hourly chart.
4.    TakeProfit is absent, the position is closed by the reverse signal.
5. Specified in of the initial version of the trading tactic we don't use breakeven.

Those of our readers who have been working with StochasticYou may have thought that the strategy is familiar to you. That's right, in various variations it has been known for quite a long time. However, not everything looks smooth. The point is that in the process of automating the strategy, we encountered some uncertainty. It turns out that the author did not offer us the most important thing - how to determine the trend on a daily chart. We decided that it is silly to limit ourselves to one thing, when we have so many possibilities in front of us, and decided to consider 5 different variants of determining the upward and downward trend on Stochastics. So...

Determination of global trend. Option #1

Downtrend - after upward movement Stochastic reverses and falls below the level of 80. We will consider the reversal of fast K upward in any zone and its return above the level of 80 as the end of the downward movement.

Rising trend - after the downward movement the Stochastic reverses and rises above the level 20. We will consider the reversal of fast K downward and its return below the level of 20 as the end of the upward movement.

Determination of global trend. Variant No. 2

Downtrend - Stochastic is moving upwards, after which it makes a reversal. We will consider the completion of the downward movement to be the fall of the fast stochastic below the level of 20 with the subsequent exit from it, as well as the return of the line above the level of 80.

Rising trend - Stochastic is moving downward, after which it makes a reversal. We will consider the completion of the downward movement as the growth of K above the level of 80 with the subsequent exit from it, as well as the return of the line below the level of 20.

Determination of global trend. Option #3

Downtrend - Stochastic completely crosses the level 80 from bottom to top, after which it makes a reversal. The crossover of K and D lines in any place of the indicator zone, as well as the Stochastic returning above the level of 80 is considered to be the end of the movement.

Rising trend - Stochastic completely crosses the level 20 from top to bottom, and then makes a reversal. The crossover of K and D lines anywhere in the indicator zone, as well as the return of Stochastic below the level 20 is considered the end of the movement.

Determination of global trend. Variant #4

Downtrend we state when the Stochastic is below the level of 20, after which there is an upward movement of the indicator and exit from this zone, i.e. a value greater than 20 is fixed.

Rising trend we state when the Stochastic is above the level of 80, after which there is a downward movement of the indicator and exit from this zone, i.e. the value less than 80 is fixed.

Determination of global trend. Variant #5

The easiest option, the classic one. Downtrend state when the signal line of Stochastic D is above the fast line K.

Rising trend определяем по обратным правилам — сигнальная линия Стохастика D находится ниже быстрой K.

We have learned quite a few ways of working with stochastics while working on the Expert Advisor. Now let's determine which of them gives more efficiency in trend detection. Place your bets, Gentlemen!
To find the best solution for determining the downtrend and uptrend, let's write the simplest algorithm: if the trend is up - buy, if it is down - sell. If the trend has changed - close the position.

Identifying the best method

To check the efficiency, we use a non-standard optimization graph, with the darker color highlighting the run whose profitability is higher. The naked eye can see that 5, 2 and 4 variations (arranged in descending order) work best for us. Now it's just a matter of testing.

We consider it pointless to give all our layouts on the search for the best option, so we present only the best one for your judgment. option 2. It turned out that it tracks trends best of all. It should be noted that the testing was conducted on the EURUSD daily chart from 1999 to the current time.

Download the report | Download settings | Download Trend Tester

Of course, it is likely that other variations on the theme will work better with other couples Stochastics. We invite you to find out. Now let's get back to our strategy.

Testing the full version of the strategy:

Now all the basic rules are clear to us, and we are ready to see how effective they are in practically author's execution for the market. We will do everything according to the worked out scheme: for testing we take the period from 1999 till today, pairs - main, working ones timeframes - daily and hourly. The results are detailed in Figures 10 - 14.

What we can say, looking at these charts... Three things are immediately striking: EURUSD showed more stable dynamics (perhaps it is the imprint of the fact that we searched for the best variant of Stochastic's trend detection work on it); the general character of the balance chart movement in pairs is extremely similar; all five pairs worked actually at zero.
Hence, we conclude that further optimization should be carried out only on the euro/dollar, and we will optimize only the parameters of the signal Stochastic, as we have already done all the rest of the work.

Strategy optimization

So: the working instrument is EURUSD, optimization period 2006-2009. Let's look at Figure 15.

As we can see in Figure 15, there are quite a few good results. But as always we are looking for the most optimal one in terms of risk and profitability.

Final testing

As a result, we found a very decent work option for the author of our strategy. Not only during the optimization period the tactic showed itself at the level, but even before that time the results are pleasing (see Fig. 16).

Download the report. Download Options.

The results shown were obtained on the EURUSD chart since 1999.

Conclusions:

It is not for nothing that they say it is better to see once than to hear a hundred times. We have a lot to show this time, and we can praise the author for excellent tactics and say thank you too. Thank you. In general, there is something to pay attention to. The author already now offers to put the Expert Advisor on a real account, let's hope that everything will work out, and of course we will wait for reports on the work done and won contests.

Description of the parameters of the obtained advisor

: t_trend_period - period of the trend chart from 1 to 7.
t_Kperiod, t_Dperiod, t_slowing - settings of trend Stochastic.
: t_up_level, t_dw_level - upper and lower levels of the trending Stochastic.
: tend_searh_type - variants of movement definition from 1 to 5.
: s_signal_period - period of the signal chart.
s_Kperiod, s_Dperiod, s_slowing - settings of the signal Stochastic.
: t_up_level, t_dw_level - upper and lower levels of the signaling Stochastic.
: count_bars_stop_loss - number of bars for determining extrema on which StopLoss will be placed

Download Expert | Discuss on forum

Leave a Reply

Back to top button