The MultiPercentageSegmentZZ looks like it has a bug in the attached files. GetZigZagData function of zz_current0, zz_current1, zz_current2 does not have h_buff,l_buff
Should it be like this?
//+------------------------------------------------------------------+//| Fill in the indicator buffers |//+------------------------------------------------------------------+void FillIndicatorBuffers(constint i,constint total,constdatetime &time[])
{
int index=total-i-1;
int copy_total=1000;
int h_buff=2,l_buff=3;
datetime start_time_in =NULL;
datetime stop_time_in =NULL;
//--- Get source data from a higher timeframedatetime stop_time=time[i]-(PeriodSeconds(HigherTimeframe)*copy_total);
CopyBuffer(zz_handle_htf,2,time[i],stop_time,h_zz_buffer_temp);
CopyBuffer(zz_handle_htf,3,time[i],stop_time,l_zz_buffer_temp);
CopyTime(_Symbol,HigherTimeframe,time[i],stop_time,t_zz_buffer_temp);
//--- Get final data from a higher timeframe
zz_higher_tf.GetZigZagData(h_zz_buffer_temp,l_zz_buffer_temp,t_zz_buffer_temp);
double htf_value=zz_higher_tf.PercentSumSegmentsDifference();
//--- First segment data
zz_higher_tf.SegmentTimes(zz_handle_current,h_buff,l_buff,_Symbol,HigherTimeframe,_Period,0,start_time_in,stop_time_in);
zz_current0.GetZigZagData(zz_handle_current,h_buff,l_buff,_Symbol,_Period,start_time_in,stop_time_in);
//--- Second segment data
zz_higher_tf.SegmentTimes(zz_handle_current,h_buff,l_buff,_Symbol,HigherTimeframe,_Period,1,start_time_in,stop_time_in);
zz_current1.GetZigZagData(zz_handle_current,h_buff,l_buff,_Symbol,_Period,start_time_in,stop_time_in);
//--- Third segment data
zz_higher_tf.SegmentTimes(zz_handle_current,h_buff,l_buff,_Symbol,HigherTimeframe,_Period,2,start_time_in,stop_time_in);
zz_current2.GetZigZagData(zz_handle_current,h_buff,l_buff,_Symbol,_Period,start_time_in,stop_time_in);
//--- On the last barif(i<total-1)
{
buffer_zz_higher_tf[i] =htf_value;
buffer_segment_0[i] =zz_current0.PercentSumSegmentsDifference();
buffer_segment_1[i] =zz_current1.PercentSumSegmentsDifference();
buffer_segment_2[i] =zz_current2.PercentSumSegmentsDifference();
}
//--- On historyelse
{
//--- In case there is a new bar of the higher timeframeif(new_bar_time!=t_zz_buffer_temp[0])
{
new_bar_time=t_zz_buffer_temp[0];
//---if(i>2)
{
int f=1,s=2;
buffer_zz_higher_tf[i-f] =buffer_zz_higher_tf[i-s];
buffer_segment_0[i-f] =buffer_segment_0[i-s];
buffer_segment_1[i-f] =buffer_segment_1[i-s];
buffer_segment_2[i-f] =buffer_segment_2[i-s];
}
}
else
{
buffer_zz_higher_tf[i] =htf_value;
buffer_segment_0[i] =zz_current0.PercentSumSegmentsDifference();
buffer_segment_1[i] =zz_current1.PercentSumSegmentsDifference();
buffer_segment_2[i] =zz_current2.PercentSumSegmentsDifference();
}
}
}
//+------------------------------------------------------------------+
More than 10 years ago I was also "fascinated" by zigzags and created a large number of them.
In the Attach there are examples - multi-zigzag for 9 timeframes and Zigzag Builder, etc. a small number of developments based on zigzags.
But the practical sense is important. Much more serious is the task of identifying those ektremums, from which you can "push back" when analysing.
As an example:
We have chosen three extrema with the help of a zigzag. We tied the Andrews Fork to them. And we see that the market exactly reached the dotted line a few days ago and exactly broke away from it.
And there are a lot of such pictures. Not any extrema found by a zigzag can be used for this purpose.
In the menu picture with numbers 0-10 and 12-14 there are 14 zigzag algorithms. And at number 11 there are 7 more zigzag algorithms for finding patterns. There are 21 algorithms in total.
In the attachment you can create a lot of algorithms with the help of the Constructor. You can use them in your own developments.
And more pictures
Going down
Let's go even lower and see how the extremum at number 1 on the chart above was formed.
This is not achieved by grinding the rays and extrema of the zigzag. And not by calculating some not quite clear statistical patterns of the zigzag.
It is more important to find such an algorithm that would detect significant extrema.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
...
Try the new version of the library now: EasyAndFastGUI - library for creating graphical interfaces
Try the new version of the library now: EasyAndFastGUI - library for creating graphical interfaces
Please add all files in one archive. Codobase's regular archive is not updated when new versions are published.
Please add all files in one archive. Kodobase standard archive is not updated when new versions are published.
Forum on trading, automated trading systems and testing trading strategies.
Libraries: EasyAndFastGUI - library for creating graphical interfaces
Anatoli Kazharski, 2019.03.13 09:22 pm.
Archive with the latest version of the library in the trailer.
ANatoli, Nice work!
One question ...
The MultiPercentageSegmentZZ looks like it has a bug in the attached files. GetZigZagData function of zz_current0, zz_current1, zz_current2 does not have h_buff,l_buff
Should it be like this?
More than 10 years ago I was also "fascinated" by zigzags and created a large number of them.
In the Attach there are examples - multi-zigzag for 9 timeframes and Zigzag Builder, etc. a small number of developments based on zigzags.
But the practical sense is important. Much more serious is the task of identifying those ektremums, from which you can "push back" when analysing.
As an example:
We have chosen three extrema with the help of a zigzag. We tied the Andrews Fork to them. And we see that the market exactly reached the dotted line a few days ago and exactly broke away from it.
And there are a lot of such pictures. Not any extrema found by a zigzag can be used for this purpose.
In the menu picture with numbers 0-10 and 12-14 there are 14 zigzag algorithms. And at number 11 there are 7 more zigzag algorithms for finding patterns. There are 21 algorithms in total.
In the attachment you can create a lot of algorithms with the help of the Constructor. You can use them in your own developments.
And more pictures
Going down
Let's go even lower and see how the extremum at number 1 on the chart above was formed.
This is not achieved by grinding the rays and extrema of the zigzag. And not by calculating some not quite clear statistical patterns of the zigzag.
It is more important to find such an algorithm that would detect significant extrema.
Can I use all these MZZ9 for MT5?