Terminal slows down when using drawing type ZigZag - page 3

 
Samuel Manoel De Souza #:

I have considered about this possible issues some time ago. i think it will look for the past bars until find a non empty value to make the connection. if it does not find it quickly it will search until the first bar in the history.

I guess if you set a DRAW_BEGIN for the plot or reduce the number of bar on the chart in the terminal settings it may work correctly.

Another thing that you can do is replace it by DRAW_LINE and assign the value of each bar between the zigzag points by yourself.

If you are using vertical lines the problem is that to plot will need loop through all bars to find the correct direction of the vertical line because it alternates up or down and it depends on all past values. So the only solution in this case would be reduce number of bars in the terminal settings. This is why may have difference on redering it in M1 and D1 or higher timeframes, because on higher timeframes there less bars.

Yeah the DRAW_LINE with Fernando's alternating buffers idea seems like the best option . 

thanks

And i'll add a custom limiter which the user can break by clicking on a "load more" button on chart.