Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Join our fan page
You liked the script? Try it in the MetaTrader 5 terminal
- Views:
- 21764
- Rating:
- Published:
- 2008.02.02 10:37
- Updated:
- 2014.04.21 14:52
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
In the standard Zigzag.mq4 the style DRAW_SECTION was used for drawing. This style allowed drawing only lines between points placed on different bars. The drawing style DRAW_ZIGZAG allows to avoid this limitation. For this purpose two buffers are used instead of one. The indicator Zigzag2_R_.mql4 illustrates this style. Added into the code: the processing of the outside bar when High of the current bar is higher than that of the previous one, and Low of the current bar is lower than that of previous. The code also shows that the color is defined by the color of the first of the two bars.
![](https://c.mql5.com/18/16/Zigzag2.png)
#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red
To call the indicator from other programs in mql4 use two constructions:
iCustom(NULL, 0, "Zigzag2_R_", 12, 5, 3, 0, index) - peaks iCustom(NULL, 0, "Zigzag2_R_", 12, 5, 3, 1, index) - bottoms
The block of processing the outside bar is given as an example. For such a situation you may use your own algorithm.
![](https://c.mql5.com/18/16/Zigzag2.png)
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/7762
![Chaikin Oscillator](https://c.mql5.com/i/code/indicator.png)
Chaikin Oscillator (CHO). Based on the book by Eric. L. Nyman Malaya entsiklopedia treidera (Small Encyclopedia of Trader)
![Accumulative Swing Index - ASI](https://c.mql5.com/i/code/indicator.png)
Accumulative Swing Index is used to analyze futures.
![Chaikin's Volatility - CHV](https://c.mql5.com/i/code/indicator.png)
The volatility indicator by Chaikin accounts for the spread changes between the maximal and minimal prices. It defines the volatility value based on the range width between the maximum and minimum.
![NRMA](https://c.mql5.com/i/code/indicator.png)
NRMA is the famous indicator by Konstantin Kopyrkin.