Today, I will talk about some of my best stop-loss practices. I have never encountered any information about these types of stop-losses. Therefore, from my point of view, they are originals.

This article will focus on original methods for calculating stop-loss, which have the potential of improving the results of your trading experience.

I, like any quant-trader, work with statistics, not on the basis of intuition. In a statistical approach to building algorithmic trading strategies, it is very useful to study the highs and lows of price movements, reversal patterns, as well as the price distance between these extremes.

Peak points have been described by many authors, and their most common variations are known to many. They include Fractals (the simplest form of determining extrema) and DeMark points (a more complex version).

For simplicity’s sake, I will refer to both of them as DeMark points, since a fractal, in my opinion, is just a variation of the DeMark pattern with 3 candles. DeMark points, in its original form, is also a pattern (almost the same fractal, but with 5 candlesticks), but for a better understanding, we need to present this reversal pattern as a full-fledged indicator.

For such a transformation, one should admit the possibility that such a pattern can be built on an arbitrary number of candles. In other words, let us create an indicator whose parameter is the number of candlesticks in the pattern. As a result, the Fractal will become a variation of our indicator with parameter 3 (with 1 candlesticks below / above the extreme), and the DeMark point will become a variation of our indicator with parameter 5 (with 2 candles below / above the extreme), and so on.

My original position exit uses 2 indicators.

The first indicator is the DeMark indicator. We need this indicator to identify extremes.

Hint: in order to correctly determine the stop level, it is best to look at the distance between the oppositely directed DeMark points, both in terms of price (how many points have been passed from one extreme to another) and in terms of time (how many candles have been passed in total).

Of course, such a value alone will not be very informative, but if we take the average / median value of these intervals between the extremes, this will be information that professional traders often use in the course of their work.

It turns out that if we calculate the average value for such a set of combinations of oppositely directed extrema, we will get the average range that the price passes through from one DeMark point to another. Thus, the second indicator is either the mean or the median - a matter of taste, since they are very similar in terms of values.

As far as you can see, these indicators are used to measure the volatility in a non-standard, but very engineering way. For instance:

The average distance between the oppositely directed DeMark points (based on 5 candles) is 1,000 points. And the price passes this distance on average for 18 five-minute candles.

Thus, we get some volatility value, in our case – 1,000 points and an average time limit of 18 candles.

Obstacles of the approach

The first problem arises when 2 DeMarks in a row are looking in the same direction. Igor Chechet suggested a solution to the problem. He developed atypical fractals, which we will describe in forthcoming chapters.

Next problem. When developing this topic, I faced the difficulty of creating an average, and then a median, which would be considered precisely between multiple points located at different distances from each other. This problem lies in the fact that there are naturally much more candles than the DeMark points themselves, the indicator is clogged with zeros in the places where there are no extrema, and the average value, like the median, tends to zero.

But the solution was found! Special indicators were developed that ignore zeros. You can go deeper into the topic of the given indicator by following our GitHub: https://github.com/xenaex

The performance of this methodology can be demonstrated by the example of a simple strategy – the Donchian channels. The strategy was tested on RTS futures, but the approach works great on the cryptocurrency market as well. Check it out!

Input specification:

· 10 minutes candles

· 7 years lookback

· 20% of capital traded

· Limit orders

· 4 years are optimized

· commissions included

· 2 parameters (number of candles in the DeMark indicator and Donchian channels period)

Hint: you can optionally define the DeMark average period.

When you look at the strategy code, you will notice that both stop and profit are set at the same distance. This is not an axiom, as many will want to make more profit on trend instruments or less on flat ones.

Here are some good results from optimizing Donchian channels with this stop:

This is the performance of the best result:

Metric Value
Net profit, % 450.76%
Annual gain, % 27.61 %
Number of trades 1802
Average profit, % 0.05 %
Average bars held 6.58
Win rate, % 53.27 %
Max Drawdown, % 20.01 %
Payoff ratio 1.07
Recovery factor 6.37
Profit factor 1.16
Sharpe ratio 1.35

As you can see, Recovery factor > 6 is a good result for a simple strategy without any bells and whistles. At the same time, there are enough unprofitable quarters.

How can this technique be used?

First of all, you can take into account how much the price has already passed from the last DeMark point and update the stop-loss level according to it. It is likewise with candles - i.e. we decrease the “number of candles before position closed” parameter by the amount that we have already passed from the last DeMark point.

Hint: you can try to analyze the predictive ability of this indicators as an entry triggers.

I hope you will find a lot more in the analysis of DeMark's multidirectional points in other sources, since I have not told everything. Maybe, you can figure out what triggers the reversal and figure out how to predict it.

And, of course, you need to check everything on your own experience. To do this, you need to run tests on candles and ticks, assess the strategies stability and diversify your portfolio of strategies.

It is worth noting that it is advisable to use them only with my DeMark indicators, since they are specific and created for each other.