Forex4you on social networks

Indicator: Ideal ZigZag

Working with built-in language MQL4, developing indicators. Discussing experiences.

Indicator: Ideal ZigZag

Postby Kirill » Thu Mar 29, 2012 7:49 am

Hey guys!
Here's a tweaked version of the ZigZag indicator! Hope it'll be useful to you.

Advantages :

The most expensive function is iBarShift which totally replaces all cycles in the code needed for peaks retrieval.
All information needed to build ZZ for every bar is accessible not only in every moment but also for every extern code.
No suspended peaks
Efficient method to find peaks is available
Very fast
Works correct at history insertions and when switching TFs.
Perfect for use in EA.


Disadvantages :

1. Memory requirements. This indicator uses 5 buffers instead of 2 (or even 1) in other similar implementations. But (imho) this is good price for advantages #6 and #7. None of fast ZigZags I have seen can process history insertions without full rebuild. Mine does it. Moreover it does it in efficient way

2. Additional lines are available. This is required to make the data visible for any extern code. These lines should never be visible.


Principle:

The ZZ is drawn by the channeling principle.

The channel width can be defined in Points (XLab_ZZ) or in Percent (XLab_ZZP)

XLab_ZZ.rar
(1.32 KiB) Downloaded 50 times

XLab_ZZP.rar
(1.33 KiB) Downloaded 51 times


screen.png
screen.png (27.83 KiB) Viewed 2873 times
Kirill
 
Posts: 482
Joined: Sat Jun 27, 2009 12:02 am

Return to MQL4 Programming Language. Scripts, Indicators.



Who is online

Users browsing this forum: No registered users and 1 guest

cron