Featured Post Today
print this page
Latest Post
Tampilkan postingan dengan label first. Tampilkan semua postingan
Tampilkan postingan dengan label first. Tampilkan semua postingan

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 yesterdays 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 todays 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 yesterdays 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 wont 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 youll 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 Ill 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 !
0 komentar

Support And Resistance My First Attempt to Implement Mechanical Detection of Important Price Levels

The detection of important price levels - so called support and resistance - is one of the most difficult things to do in algorithmic trading since their detection by the human eye seems to be extremely discretional, something that just pops out at an experienced trader when he or she looks at the chart. Through the past few years several attempts have been done to detect important support and resistance levels but most of them fail due to the fact that intermediate levels -which are not important - are often detected and used by computers when their real relevance is minimal. The question then arises : Can we algorithmically detect support and resistance levels in a reliable way ? Moreover, can we actually make a computer "know" the importance of each level ? Can we then develop a profitable system based on this detection ? On todays post I want to give my first set of answers to these questions showing you my first attempt at the computational detection of S&R levels and the achievements this technique has had up until now when used as part of a mechanical trading system.

On previous posts I had talked about how we could approach S&R detection in forex trading by using the fractal indicator (not the default but one that doesnt repaint) and performing a historical evaluation of the accumulation of fractals in certain zones, assigning a particular importance to each of these levels. However this approach seems to be a little bit complex so I decided to implement a much simpler approach in order to first evaluate the concept behind this way of "detecting" S&R levels. What I did was simply to use the High and Low levels of past candles counting their presence amongst different zones and assigning a "percentage value" to each price level pertaining to the "population" of historical candle high/low levels around this area. Areas that are heavily populated by hourly highs and lows and prone to be important daily support and resistance areas owing to the fact that price tends to "hug them" failing to move "straight through them".
--
The significance of these levels is then easily evaluated by the percentage population of each price level and we can easily measure if price is moving towards a zone with a high population or outside a zone with a high population. When price is trading within a highly populated area it will have a tendency to remain there while when price trades in a "population scarse zone" it will tend to go to a zone where more trading has happened in the past. As it is shown on the image above, we could create a system by entering a position after we "breakout" of a zone that has a high population value. It is good here to note that we dont use levels but zones using a given amount of space to gather a given high/low population, this is done due to the fact that in forex trading support levels tend to be "spread" over a given area instead of pined to a given level (this is a consequence of not having a central exchange).

What is the result of implementing this S&R "tactic" on an expert advisor ? Eventhough the results of my first analysis are not absolutely incredible, it does reveal that the above given way of measuring S&R level and entering trades has some merit and - at least - a positive mathematical expectancy and some potential for profitability. The below image shows you the equity curve of an S&R system implementing the above explained criteria for entering breakouts of S&R levels (10 year backtesting period Jan-2000, Jan-2010).
--
The system does most of the time what I intended it to do, entering trades after breakouts of S&R zones like it is shown on the image below. However the problem now becomes to know which period needs to be used to evaluate the S&R levels and what percentages are going to be required for any given S&R level to be considered important on different timeframes. As you may see, the population is an absolute number and we need to do a deep historical analysis to see what this number should exactly be to call a level "important or unimportant". Nonetheless I consider this step a very important achievement since there is now a way to measure the population of a given price level and some mathematical criteria to establish its importance. I will continue to develop and improve this S&R technique and there will most certainly be an EA with it in the future :o).
--
If you would like to learn more about automated trading and how you too can learn to use, design and implement your own likely long term profitable systems based on sound trading tactics 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 !
0 komentar

My Turtle Trading EA First Profitable Results !

After doing the first preliminary backtests and realizing that the system failed to generate profits from 2000 to 2009, I decided to take a good look at my programming and check the logic to see if I had any substantial errors that could be affecting the experts trading. After examining the expert for about an hour I realized that I had a problem with the closing logic which was partially closing positions. The ea was closing with lot sizes equal to the atr calculated values, not the values the orders were orginally opened with, so order management was a little bit of a mess.

After correcting this and other less important issues I finally came up with an expert advisor that truly trades the turtle system 2 accurately. As I expected, results are now profitable for trading since 2000 to 2009. The expert is also profitable amongst several currency pairs, including the four majors.

Backtesting reveals that this system behaves exactly as I had supposed it did. We have periods of moderate but extensive loses and then we have very large, trend catching trades that consitute most of our profits. In fact, most of this profitable trades are many times larger than the average losing trade . Trying with different exit and breakout day parameters reveals that the turtles nailed it just right. This expert will not make anyone rich overnight, with the EUR/USD (first graph), you could expect to triple your capital once every 10 years while it would take you this much time to double your capital on the GBP/USD (second graph). If you want a system that has worked for the past 40 years and that can give you a long term, stable profit, then this is a system for you.
---
As you can see on the backtesting images, this expert advisor is a slow, steady, sure money maker, based on the turtle system 2. This expert also backtests with a high consistency because it trades only on very large periods of time (sometimes trades remain opened for several months). You can get it by simply subscribing to my newsletter (corrected ea has already been uploaded to the ftp for subscribers), buying me a cup of coffee or buying my automated trading ebook.

If you would like to learn more about other free and commercial expert advisors please consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !
0 komentar
 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. forcasting forex - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger