a trading strategy based on Elliott Wave Theory - page 142

 
Perhaps I should clarify. Although diam0nd wasn't exactly complimentary, I'm still pleased to see him here as a new face :)

Dlia angloyazi4nih uzverey esty angloyazi4niy forum. Vot ya sobsno i predlogil emu tam i pisaty, tk zdesy onloko ask questions, em osobo nevezvayut a on vse prodolgaet raspaliatsia. Taki ya i predlogil poyt na English forum :)
 
Just to clear the air:
... our eyes are the culmination of millennia of evolutionary pressure designed to detect patterns (food, lions) before the patterns detect us. (Marchette D.J. Random graphs for statistical pattern recognition (Wiley 2004))
:)
 
2 Alex Niroba
Initially, by starting this thread I was trying to find like-minded people, i.e. <br / translate="no"> those who are familiar with Elliot's Wave Theory.
The idea was to write an effective indicator based on ZigZaga which would
Recognize waves and draw the future price behavior on the chart.

Alex, if you had said so from the very beginning, we could have had an interesting discussion. But since you didn't want to be specific in what you said, people moved on to a discussion of Vladislav's strategy, which he formulated more than concretely.

However, there is nothing stopping you (if you wish) from doing so now. I think you may be interested to know, in addition to Rosh's opinion, what other people think about it.

At one time I also started with ZigZaga (probably everybody goes through that :). I even wrote my own, because the standard one did not suit me. As a result I understood something not only about ZigZag, but also about Elliott's theory. That is why I am not a fan of it.

I do not consider myself to be "well acquainted with Elliott Wave Theory". However, some understanding that has emerged in the process makes me look for deeper solutions. Perhaps my main motivation is that Elliott's approach can only provide a qualitative solution. And that for trading (both manual and auto) is not enough. That is why Elliottians cannot go beyond the problem of recognizing where the 3rd wave is and where the 5th wave is.

I will, however, participate with interest in the discussion of the topic if it arises.
Good luck.
 
2 Dave Mason
I do not have a solution but we have a start. <br / translate="no"> I asked Mrs. Six to explain what she means "I would also guess that work on this topic has been done." So if she would be kind enough to explain for "free" I will share information.


If it would be of interest to you, I can tell you the following.
At that time, when I was dealing with ZigZag, I wrote a very simple Expert Advisor that detected only one pattern and traded on that basis. The configuration of the pattern I made myself based on my own visual analysis of ZigZag's behaviour.

The history test of this EA (6 months) has shown me a 26% profit for a period. I tested it on my own script tester, not on the one built into MT4. This result, as well as the understanding of a number of circumstances, did not satisfy me. That is why I abandoned this approach.

One of the circumstances that concerns you, I give here:
The algorithm for SELECTING patterns is poorly defined. The criteria for this selection are not defined at all.
As a result, the only way I had was to first come up with a pattern, and then test to see if it could be used. I don't like this approach, too much arbitrariness.

If you manage to apply graph theory to extract patterns, that would be a radical solution to the issue. But, IMHO, it must be done separately from the Expert Advisor. And the Expert Advisor should work with defined and parameterized patterns. If it succeeds, you won't need Elliott's theory at all.
 
2 Yurixx
For me (this is my opinion) Elliott Wave Theory (EWT) is about theory of graphs, or even further price movement in forex, could be explained through theory of graphs, strictly mathematical. Unfortunately EWT for me (I am not mathematician) and I think for any mathematician is not really math theory. That is why no one could be sure which wave after which is at any moment.
It is not really math theory just guessing.
Well Theory of Graphs is something beyond my capabilities.
However I received answer from Mrs. Six:
"Hi Dave,

No, this is not fantasy.

I am sure that researchers or businesses have
Published research papers or white papers that you will find
Interesting. If you don't find it with your first search on google,
keep trying.

Go for it!


Regards,
Janet Six, Ph.D.


Dave Mason wrote:

> Thank you for your prompt request.
> Can you tell me what you mean" work on this topic has
> been done"? Please, specify since my colleagues in forex forum think
> that this is "fantasy".
> Regards,
> Dave
"
Well she says this is not "fantasy".
But even if someone finds something on google or ...this does not solve the problem.
This is serious work for math professionals.
What I have done is ask one of the best professional of Graph Theory who is a professor to help in some way. He said that will answer me in a few weeks time.
 
What I have done is ask one of the best professional of Graph Theory who is a professor to help in some way. He said that will answer me in a few weeks time.

I doubt he'll say much more than Janet Six, Ph. :-)
But that's just my opinion. We'll see.

For me (this is my opinion) Elliott Wave Theory (EWT) is about theory of graphs, or even further price movement in forex, could be explained through theory of graphs, strictly mathematical.

I don't think it is. If it really were true, then forex price movements would have been predicted "strictly mathematically" a long time ago. However, the conventional wisdom is just the opposite: no amount of mathematics can accurately predict price movement.

Unfortunately EWT for me (I am not mathematician) and I think for any mathematician is not really math theory. That is why no one could be sure which wave after which is at any moment.
It is not really math theory just guessing.

That's something I absolutely agree with. And I think that's why Mandelbrot (a pure mathematician) didn't see fit to mention Elliott in his article. Speaking of that article: written at high school level, of no practical use whatsoever. Why was it written in the first place?

IMHO about Elliott's theory. The 5-3 wave pattern occurs in the market often enough that it can be fixed visually. This was obviously enough for Elliott to try to find an explanation for it. What he proposed, unfortunately, is a purely qualitative and, moreover, a "psychological" explanation. Therefore it is of little use, although it gives the impression that we know what is going on in the market. Alas, it is only an impression.

You might as well give a bunch more explanations like that. I offer, for example, my own, simple to the point of being primitive and completely obvious.
A broken ZigZag connecting Min and Max (or vice versa) always has an odd number of segments.
That is, Min-Max is 1 segment (but 2 vertices),
Min-Max-Min-Max - 3 segments (but 4 vertices),
Min-Max-Min-Max-Min-Max - 5 segments (but 6 vertices), etc.
With uptrend, the number of ZigZag steps up will obviously exceed the number of steps down.
In one of the simplest cases we get a ratio of 5-3. With downtrend it is vice versa - 3-5.
And the ratio 3-3 or 5-5 is, as one can guess, flat.

Anyone who has looked at the price chart with his eyes knows that there are various patterns in the market, and 5-3 is only one of them. Moreover, no one would dare to say that any of the patterns is impossible in principle. But 3-1 is the minimum variant for uptrend, and variants 21-1 or, for example, 21-19 are very, very unlikely. So 5-3 is just the unlikely pattern. And only those who don't understand its stochastic and even chaotic nature would try to "pull" the market on 5-3 and 3-5.

Therefore, before trying to discern between the 3rd wave and the 5th one, we should calculate (at least experimentally, through history) the distribution of frequencies of various patterns. It is not done due to the fact that it is difficult: the distribution will be two-dimensional, the algorithm of dividing the ZigZag price into separate up and down sections is ambiguous. And, furthermore, even the ZigZag can be constructed in several, significantly different ways.

What "theory" can we talk about in such a situation ? There are Elliott Waves, no argument. But there is no theory, alas.

Let someone try to reasonably contradict me.
 
Define more accurately.
I said explained not predicted.
 
Define more accurately. <br / translate="no"> I said explained not predicted.


Yes, of course. The only problem is how "more accurately". If this accuracy can be measured, then there is something to talk about. If not, then again we are left at the level of "qualitative" discussions.

And, in my opinion, the challenge is precisely to predict. And preferably with a known degree of certainty which can be determined a priori. And anything can be explained. EWT explains the market very nicely. Except that these explanations do not yet give any priority to the elites.
 
Fixed the indicator a bit.

Version 3 corrected the error of incorrect display of lines on lower timeframes of currency pairs, involving the Japanese yen.
A central line, marked in yellow, was introduced. It is the arithmetic mean of red and green levels. As for its use, there is an assumption that if this line is passed, it can be added to the already profitable position opened at red or green levels. Although over time, there may be other interpretations of its use.

//+------------------------------------------------------------------+
//|                                     AMPLITUDE_STAT_LEVELS_v3.mq4 |
//|                                        Copyright © 2006, Solandr |
//|                                                solandr99@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Solandr"
#property link      "solandr99@mail.ru"
#property indicator_chart_window

//В версии 3 поправлена ошибка неверного отображения линий на младших таймфреймах валютных пар, с участием японской йены.
//Введена центральная линия, обозначаемая жёлтым цветом. Она является средним арифметическим значением красных и зелёных 
//уровней. По поводу её использования имеется предположение, что при прохождении этой линии можно добавляться к уже 
//прибыльной позиции, открытой на красных или зелёных уровнях. Хотя с течением времени возможно появление также и других 
//трактовок её использования.
//
//В версии 2 происходит относительный расчёт размахов в соответствии со средней ценой за 25 баров.
//В принципе при достаточном количестве баров истории это эквивалентно отношению среднеарифметического значения размаха
//к среднему значению цены на истории, умноженное затем на текущее среднее значение цены (например по последним 25 барам).
//Но решено оставить всё-таки более сложный алгоритм расчёта (нормировка каждого из значений амплитуд по текущей средней 
//цене), поскольку он наверное будет вполне уместен и в случаях когда баров истории совсем немного. 
//
//Версия 1. Первоначальный вариант индикатора.
//
// ============================================================================================
//"Купи подешевле, продай подороже" - основа, на которой базируется спекуляция на финансовых рынках. 
//Данный индикатор предлагает своё видение этих уровней "подешевле" и "подороже". Он основан на простом 
//статистическом расчёте размахов (амплитуд High-Low) баров по имеющейся истории котировок.
//Расчёт амплитуд происходит по сериям от 1 до 10 баров. То есть в выбранной серии на истории находитcя разница между 
//максимальным и минимальным значением цены. Далее окно серии смещается на 1 бар и получаем следующий размах амплитуды 
//баров для выбранной серии баров. После усреднения значения полученных размахов с учётом нормировки по среднему значению 
//цены на 25 барах мы имеем среднее арифметическое диапазона колебания цены для выбранной серии баров (а точнее его 
//нормированное значение). Это значение помещается в глобальные переменные терминала.
//
//Далее при расчёте текущих уровней из глобальных переменных терминала извлекается требуемое нормированное значение 
//диапазона колебаний и умножается на среднюю цену, вычисленную по последним 25 барам. Полученное таким образом значение 
//амплитуды откладывается на графике по следующему принципу. К минимуму текущей серии 
//баров прибавляется это вычисленное значение. Так мы получаем возможный среднестатистический максимум цены для текущей 
//серии баров. То же самое делаем для нахождения среднестатистического минимума для текущей серии баров. То есть от 
//максимума текущей серии баров отнимаем полученное значение амплитуды, посчитанное для данной серии баров по историческим 
//данным. Индикатор производит описанные выше действия для серий от 1 до 10 баров. На уровнях присутствуют надписи, 
//поясняющие для какого текущего временного промежутка построен данный уровень. С параметром TF_needed="AUTO" уровни 
//строятся для серий баров текущего таймфрейма. Если требуется зафиксировать уровни какого-то таймфрейма на остальных 
//периодах, то необходимо установить это значение в MN, W1, D1, H4, H1, M30, M15, M5, или в M1. Например для значения 
//TF_needed="D1" на всех периодах будут отображаться уровни для временных промежутков от 1 до 10 дней, обозначаемых 
//соответственно как D1,...,D10.
//
//При настройках по умолчанию индикатор производит перерасчёт среднестатистических амплитуд по истории один раз в день 
//с их внесением в глобальные переменные терминала. Если по какой-то причине (например импортирование дополнительных 
//котировок) требуется произвести перерасчёт среднеарифметических значений амплитуд для серий баров не дожидаясь 
//следующего дня, то необходимо установить force_recalculation=true и будет произведён перерасчёт среднеарифметических 
//значений размахов для серий баров при следующей инициализации индикатора. После проведения принудительного пересчёта 
//значение force_recalculation нужно вернуть в значение false для исключения постоянного пересчёта данных!
//
//Данный индикатор может быть полезен при принятии решений о входе в позицию. Может поспособствовать сохранению депозита
//особенно начинающих трейдеров. Продавайте на красных уровнях и покупайте на зелёных и за Вас будет играть математика! ;o))) 
//Если Вы например купили на зелёных уровнях и курс пошёл резко против Вас, то убыточную позицию есть смысл удерживать лишь 
//до тех пор пока красные уровни не окажутся ниже Вашей открытой позиции. И когда цена окажется на этих красных уровнях - 
//закройте убыточную позицию с минимальным убытком, а во многих случаях и с маленьким плюсом. Желаю успехов!:o)
// ============================================================================================

extern string TF_needed="AUTO";
extern bool force_recalculation=false;//принудительный перерасчёт

double average_price;
bool recalculation_needed=false;
bool aver_pr_recalc_needed=true;
int last_aver_pr_recalc_bars;
double delta[11];
string work_symbol;
int TF;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
   int i,k,all_bars,counter_counted_bars;
   string b_str,global_name;
   double average_price_array[10];
 
   work_symbol=Symbol();
   
   //Выбор требуемого тайфрейма для расчёта;
   if(TF_needed=="AUTO" || (TF_needed!="MN" && TF_needed!="W1" && TF_needed!="D1" && TF_needed!="H4" && TF_needed!="H1" && TF_needed!="M30" && TF_needed!="M15" && TF_needed!="M5" && TF_needed!="M1")) TF=Period();
   if(TF_needed=="MN") TF=43200;
   if(TF_needed=="W1") TF=10080;
   if(TF_needed=="D1") TF=1440;
   if(TF_needed=="H4") TF=240;
   if(TF_needed=="H1") TF=60;  
   if(TF_needed=="M30") TF=30;  
   if(TF_needed=="M15") TF=15;  
   if(TF_needed=="M5") TF=5;  
   if(TF_needed=="M1") TF=1;  
      
   //Проверяем наличие посчитанных данных амплитуд для данного TF, а также производим проверку дня, в который был произведен расчёт этих данных
   global_name=work_symbol+"_"+TF+"_counted_day";
   if(GlobalVariableCheck(global_name) && !force_recalculation) 
   {  
      if(MathAbs(GlobalVariableGet(global_name)-DayOfYear())>0) recalculation_needed=true;
   }
   else recalculation_needed=true;
         
   if(recalculation_needed)
   {//Производим расчёт средней амплитуды бара (серии баров) по таймфрейму TF на символе work_symbol
      all_bars=iBars(work_symbol,TF);
      ArrayResize(average_price_array,all_bars);
   
      //Рассчитываем массив средних цен для каждого расчётного момента времени на основе 25 баров
      for(k=all_bars-1;k>=0;k--) 
      {      
            average_price_array[k]=0;
            counter_counted_bars=0;
            for(i=k;i<=k+24;i++)//вычисляем среднюю цену на 25 барах
            {
               if(i<all_bars) 
               {
                  average_price_array[k]=average_price_array[k]+(iOpen(work_symbol,TF,i)+iHigh(work_symbol,TF,i)+iLow(work_symbol,TF,i)+iClose(work_symbol,TF,i))/4;
                  counter_counted_bars++;
               }
            }
            if(counter_counted_bars>0) average_price_array[k]=average_price_array[k]/counter_counted_bars;
      }
   
      for(i=1;i<=10;i++) delta[i]=0;
   
      for(i=1;i<=10;i++)
      {      
         for(k=all_bars-i;k>=0;k--) 
         {  
            if(average_price_array[k]>0) delta[i]=delta[i]+(iHigh(work_symbol,TF,Highest(Symbol(),TF,MODE_HIGH,i,k))-iLow(work_symbol,TF,Lowest(Symbol(),TF,MODE_LOW,i,k)))/average_price_array[k];
            else Print("average_price_array[",k,"]<=0 при i=",i," и k=",k);
         }
         delta[i]=delta[i]/(all_bars-i+1);   
         global_name=work_symbol+"_"+TF+"_"+i;
         GlobalVariableSet(global_name,delta[i]); 
         //Print("delta",i,"=",DoubleToStr(delta[i],8));
      } 
      global_name=work_symbol+"_"+TF+"_counted_day";
      GlobalVariableSet(global_name,DayOfYear()); 
      recalculation_needed=false;
   }//if(recalculation_needed)
   else
   {//Если данные имеются в глобальных переменных терминала, то берём имеющиеся расчётные данные амплитуд из глобальных переменных терминала
      for(i=1;i<=10;i++)
      {
         global_name=work_symbol+"_"+TF+"_"+i;
         delta[i]=GlobalVariableGet(global_name);
         //Print("Глобал ",i," ",delta[i]);
      }
   }
}   
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
//----
   int i;
   string b_str;
   for(i=1;i<=10;i++)
   {
      b_str="up_line"+i;
      ObjectDelete(b_str);
      b_str="down_line"+i;
      ObjectDelete(b_str);
      b_str="up_line_txt"+i;
      ObjectDelete(b_str);      
      b_str="down_line_txt"+i;
      ObjectDelete(b_str);       
   }
   
   b_str="centr_line";
   ObjectDelete(b_str); 
   
}   

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int i;
   string line_name;
   double buffer,c_line=0;
  
   /*
   for(i=iBars(work_symbol,TF)-1;i>=0;i--) average_price=average_price+(iOpen(work_symbol,TF,i)+iHigh(work_symbol,TF,i)+iLow(work_symbol,TF,i)+iClose(work_symbol,TF,i))/4;
   average_price=average_price/iBars(work_symbol,TF);
   Print("Средняя цена по всей выборке=",NormalizeDouble(average_price,Digits));
   average_price=0;
   */
   
   if(iBars(work_symbol,TF)!=last_aver_pr_recalc_bars) aver_pr_recalc_needed=true;
   
   if(aver_pr_recalc_needed)
   {  
      average_price=0;
      for(i=0;i<=24;i++) average_price=average_price+(iOpen(work_symbol,TF,i)+iHigh(work_symbol,TF,i)+iLow(work_symbol,TF,i)+iClose(work_symbol,TF,i))/4;
      average_price=average_price/25;
      aver_pr_recalc_needed=false;
      last_aver_pr_recalc_bars=iBars(work_symbol,TF);
   }
   //Print("average_price=",NormalizeDouble(average_price,Digits));
   
   for(i=1;i<=10;i++)
   {  
      if(TF==43200) line_name="MN"+i;   
      if(TF==10080) line_name="W"+i;
      if(TF==1440) line_name="D"+i;
      if(TF==240) line_name="H"+4*i;
      if(TF==60) line_name="H"+i;
      if(TF==30) line_name="M"+30*i;
      if(TF==15) line_name="M"+15*i;
      if(TF==5) line_name="M"+5*i;
      if(TF==1) line_name="M"+i;
      
      buffer=iLow(NULL,TF,Lowest(work_symbol,TF,MODE_LOW,i,0))+delta[i]*average_price;      
      up_line(i,buffer,line_name);
      c_line=c_line+buffer;
      buffer=iHigh(NULL,TF,Highest(work_symbol,TF,MODE_HIGH,i,0))-delta[i]*average_price;
      down_line(i,buffer,line_name);
      c_line=c_line+buffer;      
   }
   
   c_line=c_line/20.0;
   centr_line(c_line);
   
   return(0);
  }
//+------------------------------------------------------------------+
int up_line(int q_days, double level, string ln)
{
   string b_str="up_line"+q_days;

   if(ObjectFind(b_str) == -1) 
   {
     ObjectCreate(b_str, OBJ_TREND, 0, Time[1], level, Time[1]+2700000,level);
     ObjectSet(b_str, OBJPROP_STYLE, STYLE_DOT);
     ObjectSet(b_str, OBJPROP_COLOR, Brown);
     ObjectSet(b_str, OBJPROP_RAY, true);
     ObjectSet(b_str, OBJPROP_WIDTH, 1);
     ObjectMove(b_str, 0, Time[1],  level);
   }
   else 
   {
      if(MathAbs(level-ObjectGet(b_str, OBJPROP_PRICE1))>0.9*Point) ObjectDelete(b_str);
   }
   
   b_str="up_line_txt"+q_days;
   string b_txt=ln;
   datetime t_bar;
   if(ObjectFind(b_str) == -1) 
   {
     ObjectCreate(b_str, OBJ_TEXT, 0, Time[0], 0);
     ObjectSetText(b_str, b_txt, 8, "Arial", Brown);
     ObjectMove(b_str, 0, Time[0]+2*q_days*Period()*60,  level);
   }
   else 
   {
     ObjectMove(b_str, 0, Time[0]+2*q_days*Period()*60,  level);
   }      
   
   return(0);
}

int down_line(int q_days, double level, string ln)
{
   string b_str="down_line"+q_days;
   
   if(ObjectFind(b_str) == -1) 
   {
     ObjectCreate(b_str, OBJ_TREND, 0, Time[1], level, Time[1]+2700000,level);
     ObjectSet(b_str, OBJPROP_STYLE, STYLE_DOT);
     ObjectSet(b_str, OBJPROP_COLOR, DarkGreen);
     ObjectSet(b_str, OBJPROP_RAY, true);
     ObjectSet(b_str, OBJPROP_WIDTH, 1);
     ObjectMove(b_str, 0, Time[1],  level);
   }
   else 
   {
      if(MathAbs(level-ObjectGet(b_str, OBJPROP_PRICE1))>0.9*Point) ObjectDelete(b_str);
   }
   
   b_str="down_line_txt"+q_days;
   string b_txt=ln;
   if(ObjectFind(b_str) == -1) 
   {
     ObjectCreate(b_str, OBJ_TEXT, 0, Time[0], 0);
     ObjectSetText(b_str, b_txt, 8, "Arial", DarkGreen);
     ObjectMove(b_str, 0, Time[0]+2*q_days*Period()*60,  level);
   }
   else 
   {
     ObjectMove(b_str, 0, Time[0]+2*q_days*Period()*60,  level);
   }      
   
   return(0);
}

int centr_line(double level)
{
   string b_str="centr_line";
   
   if(ObjectFind(b_str) == -1) 
   {
     ObjectCreate(b_str, OBJ_TREND, 0, Time[1], level, Time[1]+2700000,level);
     ObjectSet(b_str, OBJPROP_STYLE, STYLE_DOT);
     ObjectSet(b_str, OBJPROP_COLOR, Yellow);
     ObjectSet(b_str, OBJPROP_RAY, true);
     ObjectSet(b_str, OBJPROP_WIDTH, 1);
     ObjectSet(b_str, OBJPROP_BACK, false);
     ObjectMove(b_str, 0, Time[1],  level);
   }
   else 
   {
      if(MathAbs(level-ObjectGet(b_str, OBJPROP_PRICE1))>0.9*Point) ObjectDelete(b_str);
   }
   
   return(0);
}
 
<br/ translate="no">
There are Elliott Waves, no argument. But the theory, alas, is not.

Let someone try to reasonably contradict me.



Why not? I can see how you found a theory using the zigzag. And explained it all :-)
Only the zigzag is just an indicator that shows the percentage deviation of the price in the opposite direction. You might as well have used crosses and zigzags, which do the same thing, only not in percentage, but in absolute value.
To compare images you have to at least recognise the sketch, and with a zigzag this is problematic.
Elliott in lesson 12 started it, Neely in chapter 5-9, or better yet in chapter 6-1, then Multipoints (unknowingly) showed how to identify waves. And it works. I've tried online charting a minute chart and repeatedly from morning to night it all came together. Rarely have I had to change anything. There are times when the channel (trendline) goes a little lower after the double and captures a few touches of the stretched third.
Reason: