Watch how to download trading robots for free
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
3733
Rating:
votes: 19
Published:
2021.10.19 10:27

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

Using the indicator without optimization made it difficult and time-consuming to test EAs using the values of the custom indicator Zigzag. The optimized version solves this problem.

The first time, at the first launch, the indicator calculates the entire history. On subsequent calls, when new ticks arrive in real time or when used in the tester, the third extremum from the current time is located deep into the history and recalculation starts from it. If you want to start recalculation from the second extremum, change the value of the level variable, which determines the depth of recalculation:

 int level = 3 ; // recounting's depth

Zigzag R

All external variable names have been retained for consistency reasons. In addition, the extremums hanging in the air, which were formed on minute time frames, have been removed.


Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/11206

TMA Moving Average TMA Moving Average

Thuật toán đường trung bình trung tâm lượng giác

FX Margin Calc FX Margin Calc

FX Margin Request Per Lot Calculator Tính yêu cầu ký quỹ cho 1 lot

Ferox MTF Viewer Ferox MTF Viewer

Ferox Muti Timeframe Viewer

Standard Deviation Moving Average Bollinger Band recode with new defines Standard Deviation Moving Average Bollinger Band recode with new defines

Recode and new define: Standard Deviation, Moving Average