a trading strategy based on Elliott Wave Theory - page 259

 
cooper123 19.03.07 15:15

Maybe I'm thinking too much, but I don't understand what channel crossover is.
The picture is a typical situation, but there is no channel crossover as such.
There are channels with different scales. I do not understand how a pivot zone is formed by crossing channels.
Maybe someone can explain this picture.


Here is one of the typical reversal zones



I wanted to show a semblance of a probability gradient in this zone using different colours.

ZZZ I first made it in Paint, then I got embarrassed and redid it in Photoshop
 
<br/ translate="no"> Therefore, if you give me the right to choose, I choose MQL. :-))
Here or directly to my mailbox - as you wish.
Thank you in advance.


Ok!


The code itself:

//+------------------------------------------------------------------+
//|                                     Moving Average Batteruot.mq4 |
//|                                                  Code by Neutron |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_color1 Blue
#property indicator_width1 3

#define Pi 3.14159
extern int FLFPeriod=300, K=1;
int Start,i,m;
double Gamma,alfa,b,ci,g,MA[5000],Y[5000]; 

int start()
{
Start=5000;
Gamma= MathPow(0.484,1/(2*K))/MathTan(Pi/(FLFPeriod+1));	 
	 MA[Start+1]=Open[Start+1];
	 MA[Start+2]=Open[Start+2];
	 for (i=0;i<=Start;i++) {Y[i]=Open[i];}

for (m=1;m<=K;m++) 	 {
	 alfa=2*MathSin(Pi/4*(2*m-1)/K);
	 g=1/(Gamma*Gamma+Gamma*alfa+1);
	 b=2*g*(Gamma*Gamma-1);
	 ci=g*(Gamma*Gamma-Gamma*alfa+1); 
	 for (i=Start-2;i>=0;i--) {MA[i]=g*(Y[i]+2*Y[i+1]+Y[i+2])+b*MA[i+1]-ci*MA[i+2];}	 
    for (i=Start-2;i>=0;i--) {Y[i]=MA[i];}
                       }
}

int init()
{
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,Y);
   return(0);
}



So, you put the indicator on the chart and work. This is optimal (in the sense of phase delay (PD)) low-pass filter (LPF). I put two precursors in the settings:
FLFPeriod - natural number in the range from 2 to the desired one. It is responsible for the bandwidth of the LPF.
K is a natural number in the range from 1 to the desired one. This variable sets the order of the LPF, which in turn determines the slope of the LPF. All details of the operation and design of the LPF are given at the link above. One must remember, that at K>2 high-frequency harmonics are suppressed VERY strongly and further order increase makes no sense - it leads only to a large increase in FS and appearance of parasitic weakly damped beeps (Gibson phenomenon) in the starting point (at me it is 5000 bars). The averaging is done using opening prices.
By experience, I found that for practical purposes, it is optimal to select the K=1, and the maximum smoothing quality/FZ ratio is reached.

 
Thank you very much Jhonny
It's all more or less clear now, and even where to put potential energy seems to be imaginable too.


Good luck with that.
 
to Neutron.
Of course I missed a lot in this thread, but looking at the code of the indicator, and even earlier looking at what this indicator draws, I don't understand - what's the point?
First, this mouwing has the same lag and has no advantage over its counterparts (it's on the chart).
Secondly, from the code of the indicator, I didn't see any highlighting. I will now go through the last 5 pages of the thread, maybe I will find the answer.

PS. The code in the indicator is far from perfect.
 
to Rosh

It all depends on what purpose you are pursuing with this or that LPF. For my TS it is important to have the lowest possible SPF with maximum stability in the filter bandwidth. These are the qualities that Butterloot filters meet (details in the link above). For example, here is a screen shot of the terminal running two muwenges - Butterluot (blue) and simple sliding summation (red).



It can be seen that with greater PZ, the standard filter shows less quality smoothing, it is manifested in the transmission of high frequency components (breaks on the graph) and suppression of the spectrum low frequency components (lack of average dips and hills). Specifically in my TS, this leads to more than half the profitability. Besides, by changing the K parameter we can, at our discretion, change the shape of the filter bandwidth, bringing it closer to the ideal or, on the contrary, going in the direction of a simple moving average. Agree, it's an extra knob for an inquisitive mind!

P.S. The code, I agree, is sub-optimal as I scratched it myself :-)
 
Drinking cognac and reflecting on the harmony of Chaos. :)
 
2 Neutron
Hi Sergei ! Thanks for the code, I have compared the pictures. I wanted to post the result, but mql4.com had problems with the editor, and then I caught a virus and had to clean and restore the data. Now I am posting it.


I don't know how does the FLFPeriod parameter correspond to the normal МА period, that is why I have taken the period=100 for all three charts. In addition, K=1. The blue line is the Butterloot MA, the red line is mine, CadetBlue is the standard simple MA.
Perhaps this picture will not impress you, because my curve is not smooth enough with a smaller FP.
However, I did not pursue such a goal, just "reporting results". :-))
 
I don't know how your parameter FLFPeriod relates to a normal MA period, so I took a period of 100 for all three graphs. Also, K=1. The blue line is the Butterloot MA, the red line is mine, CadetBlue is the standard simple MA.
Probably this picture will not impress you, because with my lower FP the curve is still not smooth enough.


Yura, hi!
Honestly, I did not set myself the task of linking the FLFPeriod parameter to the FLF bandwidth, but it's not hard to do.
It would be interesting to see your results, if the parameter of all filters is matched so that the FLFs coincide.

Below I give you the code of Butterloot's LPF with ZERO FZ!!!! :-)))
//+------------------------------------------------------------------+
//|              Moving Average Batteruot Simmetric (ЭТО ШУТКА!).mq4 |
//|                                                  Code by Neutron |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_color1 Red
#property indicator_width1 3

#define Pi 3.14159
extern int FLFPeriod=20, K=4;
int Start,i,m;
double Gamma,alfa,b,ci,g,MA[5000],Y[5000]; 

int start()
{
Start=5000;
Gamma= MathPow(0.484,1/(2*K))/MathTan(Pi/(FLFPeriod+1));	 
	 MA[Start+1]=(Open[Start+1]+Close[Start+1]+High[Start+1]+Low[Start+1])/4;
	 MA[Start+2]=(Open[Start+2]+Close[Start+2]+High[Start+2]+Low[Start+2])/4;
	 for (i=0;i<=Start;i++) {Y[i]=(Open[i]+Close[i]+High[i]+Low[i])/4;}

for (m=1;m<=K;m++) 	 {
	 alfa=2*MathSin(Pi/4*(2*m-1)/K);
	 g=1/(Gamma*Gamma+Gamma*alfa+1);
	 b=2*g*(Gamma*Gamma-1);
	 ci=g*(Gamma*Gamma-Gamma*alfa+1); 
	 for (i=Start-2;i>=0;i--) {MA[i]=g*(Y[i]+2*Y[i+1]+Y[i+2])+b*MA[i+1]-ci*MA[i+2];}
	 Y[0]=MA[0];
	 Y[1]=MA[1]; 	 
          for (i=2;i<=Start-2;i++) {Y[i]=g*(MA[i]+2*MA[i-1]+MA[i-2])+b*Y[i-1]-ci*Y[i-2];}
                       }
}

int init()
{
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,Y);
   return(0);
}



DO NOT TRY TO USE THIS CODE TO BUILD A TRADING STRATEGY!!!




 
2 Neutron
I appreciate the joke ! :-))
But how nice it looks !
I adjusted my MA parameter to match the main maximum of the picture.
So, FLFPeriod=100, K=1, my MA has period=136 and the period for MAsimple=136.
You can see from the picture that coincidence of one maximum does not necessarily mean coincidence of the others.


By the way, I need to correct the indicator code. Instead of
MA[Start+1]=Open[Start+1]; MA[Start+2]=Open[Start+2];


write

MA[Start]=Open[Start]; MA[Start-1]=Open[Start-1];



 
<br/ translate="no"> Ok!

Code proper:
...............................................................


Thanks for the indicator - interesting.

One more thing: there is an error in the code - it exceeds array bounds.
Set the size of double MA[5003];
Y[] may not be placed, but leave double Y[]; will be correct.


Good luck.
Reason: