Indicators: Simple ZigZag

 

Simple ZigZag:

Simplified version of the popular ZigZag indicator. The algorithm runs significantly faster, does not use intermediate calculation buffers, does not contain nested cycles and, therefore, does not redraw itself.

The only input parameter - Typical retracement size - is different for different time frame for convinience

Author: Oleg Shenker

 

Hi, Oleg

Great work of yours

I have tested your code and it is really simple.

However I will make some comments aiming to help further improvement and also clarify doubts of others, if I may.

1 - You say your indicator does not redraw. I have run it and and it REDRAWS. Whenever it finds another lower or higher value it redraws the lines.

2 - The code as it was, did not run on the strategy tester for the nem bars, only for older ones.

I have fixed this by changing line 141 to Start = prev_calculated -1 instead of +1.


Except for this I have found your work a great job.

Do you have any suggestions on what parts of your code could be added to an Expert Advisor

No need to draw any lines or to calculate old bars....

Thanks in advance and congrats on the great work

Best of Regards


Salu from Rio de Janeiro

Reason: