ProHvost - strategy on long shadows

Trading strategies and their automation

In issue 78 of ForTrader.org I would like to conduct my personal research on trading strategies based on the observation of the behavior of Japanese candlesticks. Of course, we cannot say that the price always behaves the same way, but Head and Shoulders pattern It has been used for many years and is still actively used in the analysis of certain exchange-traded assets.

Terminology used

A few words about the principles of the found pattern: while observing various combinations of candlesticks, I paid attention to their peculiarity to close their excessively long shadows in the hour chart of the EURUSD pair. That is, as soon as the upper or lower shadow of a candle is big enough, we have a high probability that the price will go back to its Low level, and thus we can earn the number of points equal to the height of this "tail".

Further in the text, for ease of understanding and further discussion, I would like to propose my own terminology for the parts of an ordinary Japanese candle. So, I will call the head of the candle the upper shadow, the tail - the lower part, the body remains the body.

Here are some examples of closing the "tail". Similar rules, by the way, will work for the "head".

Fig. 1. Example of closing the "tail".
Fig. 1. Example of closing the "tail".
Fig. 2. Another example of closing the "tail".
Fig. 2. Another example of closing the "tail".

The basis of the ProHvost trading strategy

Of course, such "tails" are not always closed exactly as in the figures - in different circumstances the price can go in the opposite direction, but according to my observations, it happens more often than not, which means we have an occasion to build an interesting trading strategy and robot for it, which will help us to understand the length of "tails" and "heads". To do this we will divide the candlestick into several points: A - candlestick's High, B - the upper part of the body candles, C - bottom of the bar body, D - Low of the candle. Let's see how it will look on the chart.

Fig. 3. Marking the candle.
Fig. 3. Marking the candle.

Для того, чтобы просчитать наиболее выгодный паттерн, то есть комбинацию размеров свечи, при которой с наибольшей вероятностью мы можем получить продолжение движения и закрытие длинного «хвоста» или длинной «головы» по направлении нашей сделки, мы будем измерять длину «головы» – расстояние от A до B, высоту тела – от B до C, и длину хвоста – от C до D. В точке A мы, рассматривая сделку на покупку, мы будем размещать Тейк Профит. Стоп Лосс будем подбирать в пунктах от точки входа.

Programming the ProHvost robot

So, after programming these simple rules, we obtained the following results of optimization on the hour chart of the EURUSD pair for the penultimate three months of this year. We leave the next three months to test the workability of the parameters on the future timeframe.

Fig. 4. The result of the condition optimizer for the BUY trade.
Fig. 4. The result of the condition optimizer for the BUY trade.
Fig. 5. Optimization result on the graph.
Fig. 5. Optimization result on the graph.

Let's check the generated parameters with the tester on the future plot, using the next three months.

Figure 6. The result of the ProHvost strategy for the future period.
Figure 6. The result of the ProHvost strategy for the future period.
Figure 7. General performance graph of the ProHvost strategy for the last 6 months.
Figure 7. General performance graph of the ProHvost strategy for the last 6 months.
Fig. 8. Test results.
Fig. 8. Test results.

As we can see in the presented charts, the parameters for AB and BC values, which were selected by the tester after automation, turned out to be quite effective for future periods. It means we can trust these parameters, especially considering the 30% increment to the deposit and the maximal drawdown in the amount of 5% for six months.

As a result, we got the following parameters for the working candle of the Buy rules:

  1. The candle is growing;
  2. The size of the "head" of the candle (that is the longest part to close) is 20 to 50 points;
  3. The size of the body of the candle ranges from 0 to 100 pips;
  4. StopLoss - 20 points, TakeProfit, as I have already written, set at point A.

To illustrate, let's demonstrate a few trades made by the tester, according to these rules:

Figure 7. Example of making sell trades using ProHvost strategy.
Figure 7. Example of making sell trades using ProHvost strategy.
Figure 8. Example of a Buy trade according to our strategy.
Figure 8. Example of a Buy trade according to our strategy.

As you can see, everything is quite simple and interesting, and most importantly, it works. We suggest you to try and manually evaluate the effectiveness of this strategy in Sell trades, and in next issue we'll look at the optimal parameters for sales and examine the strategy as a whole.

And of course, I'm always ready for a dialogue and waiting for your questions and suggestions on the forum!

One Comment

Leave a Reply

Back to top button