Calculating Support and Resistance, My First Solution

Yesterday I wrote a post about the mathematical definition of support and resistance levels and why it is so hard to accurately define these levels in a way a computer can understand. We talked about several of the problems which affect this definition mainly the fact that most of the currently used approaches do not have any way of discriminating between the importance of different levels, something which has a devastating effect over system profitability. At the end of yesterday’s post I also highlighted that there are mainly three steps that have to be taken into account to successfuly tackle the problem of mathematically defining support and resistance levels for forex trading :
  • Defining the S&R levels
  • Eliminating unimportant levels
  • Defining S&R zones
On today’s post I am going to tell you how I intend to solve each one of these issues and how I believe this will lead to a reliable definition of S&R levels.

The first problem seems to be the one people have worked the most on. As I said on yesterday’s post there are several ways of defining these S&R levels but the technique I find the most reliable involves the use of the fractal indicator. Since fractals signal reversals, they are useful in determing the global position of S&R levels. This concept is not new and it is a quite typical way of defining support and resistance in a mechanical fashion.

Now the next problems are a little bit harder to solve. How do we discriminate between the importance of levels and define their zones ? From the definition of support and resistance levels it becomes quite clear that the importance of a support or resistance level is given by the number of times this level has been tested (either as support or resistance). Therefore, if we save an array containing all fractals and we then assign each fractal a frequency value depending on the number of times this exact level was tested then we will have a reliable indication of which levels are “strong” and which levels are “weak”. Staying only with the strong levels will definitely allow us to trade S&R strategies in a much more reliable fashion.

Of course, several of you may be thinking that I won’t be able to succeed with this tactic given the fact that fractals are bound to be many times similar but almost never identical. For example a level around 1.5343 on the EUR/USD could be tested 3 times to give fractals at 1.5341, 1.5343 and 1.5345, within my definition, these three levels would be discarded since they are all different and therefore “insignificant”. The solution to this problem is the addition of a “tolerance” zone around each fractal to group them according to the zones they cover. For example, two fractals will be considered as belonging to the same support or resistance zone if their values are within X distance of each other. How do we define this distance ? Volatility seems to be the best candidate since this is the main factor which affects the width of S&R zones. We can define X as a given percentage (for example 10%) of the standard deviation of price within the last Y number of periods.

Then we have the problem of having only a “huge” important price level given that all fractals are bound to be close to another one. We need to define a “center fractal” for each level which will be defined as a fractal which has more than Y fractals within its tolerance zone. This takes care of the importance problem and level definition at the same time.

This simple grouping of fractals will let us define the important S&R zones and simulatenously the width of these zones which of course will be limited to +/- X% of the standard deviation (however they can still be smaller than this). The steps this S&R indicator would need to do are highlighted below :

  • Calculate all fractal levels
  • Calculate each fractals population within its tolerance zone
  • Assign “level status” to fractals with the highest populations
  • Determine the highest and lowest fractal within each central fractal population zone
In the end this indicator will give us each important S&R zone coupled with its width, a criteria which is bound to be extremely useful for the making of long term profitable systems based on S&R trading. I will start developing this indicator soon and hopefully you’ll be able to see some graphical results within the next few weeks. Do you have any suggestions to improve this technique ? Leave a comment and I’ll be glad to discuss it with you. :o)

If you would like to learn more about the automated trading systems I have coded and how they were developed step by step please consider buying my ebook on automated trading or joining Asirikuy to receive all ebook purchase benefits, weekly updates, check the live accounts I am running with several expert advisors and get in the road towards long term success in the forex market using automated trading systems. I hope you enjoyed the article !

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

3 Responses to “Calculating Support and Resistance, My First Solution”

  1. Maxim says:

    Hello Daniel,

    I like this idea very much!
    Are you planning to build the EA, based on the described indicator, once it is ready?

    Maxim

  2. Taras says:

    Hello Daniel,

    Have you finished the aformentioned indicator? Does it work?

  3. Robert Bazil says:

    Dear Alex

    Please accept my apologies for such a late post, but I have only just read this article.

    Your FractalSupportResistance indicator is really excellent and I am now using it to identify SR areas or confirm lines I have already drawn by eye.

    Would you very kindly let me know if it is possible to turn OFF one or more of the timeframes? At the moment there is no facility to do this. Perhaps you have a more recent version of the indicator.

    Many thanks for taking the time to read this and again, my apologies for disturbing you.

    Kind regards
    Robert

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.