Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Zigzag R - MetaTrader 4 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Zigzag R - indicator for MetaTrader 4

This version of Zigzag is a simple optimization of the old version of Zigzag.mq4 , to which hundreds of thousands of MetaTrader users have been accustomed since the MT3 version (MQL2 language).

Using unoptimized indicators makes testing EAs with the values ​​of the custom indicator Zigzag difficult and time-consuming. The optimized version solves this problem.

For the first time, on the first launch, the indicator calculates the entire history. In subsequent calls, when new quotes arrive in real time or are used in the tester, the third extremum of the current time is located deep in the history and calculations are recalculated starting from it. If you want to recalculate starting from the second extreme value, change the value of the level variable, which determines the depth of the recalculation:

 integer level = 3 ; // Recount depth 

Zigzag R - indicator for MetaTrader 4

For consistency reasons, all external variable names have been reserved. Additionally, hanging extreme values ​​formed on the minute timeframe have been removed.


Attachment download

📎 ZigZag_R_.mq4 (8.78 KB)

Source: MQL5 #11206

Verification code Refresh