| / | Search |
|
Introduction Everybody who takes working on financial markets seriously, start creation of their individual trading systems earlier or later. The author of this present article created ZUP, ZigZag Universal with Pesavento Patterns, as a result of this search. The MetaQuotes Software Corp. suggested me writing an article about this indicator. This present article is the first attempt to do it. In this and in the successive articles, I will describe the features of indicator ZUP, version 60 (ZUP_v60). It happened so that Data Centers through that the author accessed to financial markets were using the MetaTrader 4 platform. The standard indicators embedded in the trading terminal did not provide necessary analyses of the market with necessary efficiency. I prefer to arrange the place where I am rather than to find another one. Therefore, I had to do so that I would be able to make all necessary market analyses using the MetaTrader 4 Client Terminal, which allows creation of one's own indicators using its embedded language, MQL4.
Pesavento Patterns ( http://www.ensignsoftware.com/tips/tradingtips35.htm#Pesavento ) On the chart below, the ZigZag breaks are joint by dotted lines. A number is given in the middle of each dotted line. These are the dotted lines with numbers near them that represent a tool named Pesavento Patterns. The tool named Pesavento Patterns must be distinguished from the market shapes named Pesavento Patterns. We will explain below what the market shape named Pesavento Patterns represents.
Again and again, we come back to the ZigZag indicator after having read some intelligent books about Elliot's wave theory, Fibo levels, Gartley's patterns, etc. An endless circle. An infinite subject to discuss.
Introduction Among all possible algorithms of zigzag charting, we can distinguish a class that the author names "Zigzags with Switching upon Breaking Through the Slowing Level". This class, in full or in part, includes most existing ZigZags. The name of the class itself, in fact, represents an algorithmic template. To make an indicator out of it, it is sufficient just to add the function that would detect the slowing level. The diversity of algorithms of such function is only limited by the imagination of the author of the future ZigZag.
A huge amount of ZigZag versions proves the existence of a constant and persistent interest in this indicator. A quite worthwhile interest. This is perhaps the only indicator that directly affects trader's emotions forcing the immediate actions with its bright vivid graphical representation of the main market movements. Apparently, this can be the only explanation of the phenomenon, with the majority's thorough understanding that this indicator is not intended for production of direct trading signals, nevertheless they continuously attempt to maximally approach it to the current market situation. Observing the endless redrawing of the last forecasting fracture is a doubtful advantage, especially when perceiving it.
Problem Statement Let's think of what we have and what we want to have. Let's take a well-known ZigZag from the standard delivery of MetaTrader 4 as an example. Attach it to any currency pair's chart on any timeframe: Do you really want to trade with it? Everything is clear: you should sell on the upper kink and close your position by buying on the lower one.
Well, and finally, the well-beloved indicator ZigZag that, as we can see from analysis, is re-counted on all bars, too, and, therefore, represents the problem in question! I suppose it to be even unnecessary to put th code of this indicator in this present article since it can always be taken from the "indicators" folder of the MetaTrader 4 Client Terminal.
for(i1=Bars-1;i1>=0;i1--) { P1=iCustom(NULL,0,"ZigZag",0,i1); if(P1!=0) break; } // process the ZigZag points for(i2=i1-1;i2>=0;i2--) { // find the next point and save its location and price
It is not necessary to program an initial logic of drawing an object on a chart. By the way, it is not so easy to reach the necessary logic programmatically. Take a look, how many "ZigZag" indicators there are, for example. Here I want to show how to implement an indicator of intersection of a hand-drawn trend line.
After the testing is finished, you can use the button "Open Chart" to open a chart, reflecting all points of entry and exit, as well as the indicators that were called from the Expert Advisor. But it is often ignored, that the indicator values, at the given moment calculated on the history, may significantly differ from the values that were at the moment of testing (actually, on-line). A vivid example is the indicator ZigZag.
Opening the testing chart of the EA, where this indicator was used, we can see clearly all the breaks of the ZigZag. One could expect a good profit from a strategy, based on the tracking of such breaks on the zero bar. Those who do not understand the MT4 tester operation principle erroneously think, that such strategy should show the absolute profit in the tester, because in other TA programs future is seen for such strategies. But we do not see any profit, moreover the trades are opened at a wrong location! Start testing in the visual mode, attach to the chart all indicators used by the EA - and illusions will dissolve! This does not require special knowledge - the tester will display everything in the visual mode. Here is the example of such an EA - ExpertZigzag: Pages: 1 2 |