Indicators: FivePattern

 

FivePattern:

This indicator shows М & W Wave Patterns by Merrill and support/resistance levels on a chart.

The indicator is recalculated on each new history bar (to save CPU time when rendering objects). The names of all objects are pseudo-random.

The indicator calculates the predicted price movements based on the expectations of a private (serial) evolution/mutation of waves. the indicator includes a counter of pattern model efficiency.

FivePattern

Author: Andrey Emelyanov

FivePattern
FivePattern
  • www.mql5.com
This technical indicator shows М & W Wave Patterns by Merrill and support/resistance levels drawn at extreme points of the standard ZigZag indicator. A. Merrill classified five-pointed shapes based on the order of the points from top to bottom, and created an orderly classification model M & W Waves. Here they are: The dynamic pattern by A...
 

the development is interesting,

but I don't understand what I'm doing wrong, because when I compile it gives errors

 
vspexp 2014.05.22 03:53    RU

the development is interesting,

but I don't understand what I'm doing wrong, because when compiling it gives errors.


The problem is in the names of uploaded files, you need to remove endings like __1.
 
Ern.CheGevarra:
The problem is in the names of uploaded files, you need to remove endings like __1.
Thanks a lot, it helped!
 

Dear forum members, who has any ideas, suggestions on how to improve the code (especially regarding the forecast calculation), please write in the forum without hesitation! THIS IS NOT THE FINAL VARIATION OF THE CODE, BUT ONLY THE BEGINNING...
 
About the zigzag algorithm - for a more correct calculation, the idea is to take data from the minute timeframe.
 
Ern.CheGevarra:
About the Zigzag algorithm - for more correct calculation the idea is to take data from the minute timeframe.
Your idea is good. I am now working on the Zigzag algorithm - where values are sampled not by the Deviation filter, but by the percentage filter. In this way I will get rid of the rigid binding to the price. But I will also add your idea so that I have something to compare it with.
 

Respect and respect for the indicator, more such meaningful code in the base!

 
Posted my version of the zigzag to the base. No minutes.
 

Good afternoon!

I am posting a new (second) version of FivePattern indicator. This time this version is for generating trading signals(i.e. trading version). It has on board 5 indicator buffers (a lot - I know, I think how to avoid it, but all of them are needed to generate trading signals). Briefly about the buffers:

0 ExtPointE[] - stores values of point E, if the price is near this point we can expect movement towards Evolution/Mutation points;

1 ExtDeltaDE[] - stores the value of the D-E wavelength in points(I assume that this value will be useful in the algorithms of averaging the point E); Example code:

double RateRisk; // Процент риска

MqlTick now_tick;

SymbolInfoTick(_Symbol,now_tick);

if((now_tick.ask >= (ExtPointE[rate_total-1]-ExtDeltaDE[rate_total-1]*RateRisk*_Point))&&(now_tick.ask <= (ExtPointE[rate_total-1]+ExtDeltaDE[rate_total-1]*RateRisk*_Point)))

  { ...;// Генерировать сигнал} else ...;// Не генерировать сигнал

2 ExtEvolution[] - stores the value of price movement forecast in case of model evolution;

3 ExtMutation[] - stores the value of price movement prediction in case of model mutation;

4 ExtSumModel[] - stores the value = count_evolution/(count_evolution+count_mutation) . To get mutation_count = 1 - ExtSumModel[rate_total-1] . Necessary to set dynamic weighting of trading signals.

Changes:

1. Added "anti-flat" code when defining the E-point;

2. Added code "checking the dimensionality of the D-E wave", i.e. now I correct point E if it is less than the expected value (significantly reduced the number of redraws of point E, and improved forecast);

3. Revised the code of price movement forecasting (Evolution/Mutation level_0);

4. The indicator is calculated on the whole available history of the terminal, i.e. the model counter shows the real value, not the weather on Mars :-)

5. Fixed drawing of Arrow points, now they are almost always in the middle, not at the bottom as before;

6. Added an icon to the project.

What I didn't have time to do:

1. Add the ability to select Zigzag calculation methods. I really wanted to, but didn't have time, and it's not a good idea to post poorly debugged code in even versions ;-).

2. Calculation of level_1 evolutions/mutations, there are traces of it in the code, but I wouldn't use it.... for now it's just a test of my pen.

Files:
 

It generates errors when compiling.