- www.mql5.com
- Color of ZigZag indicator?
- Zigzag color problem
- How to draw secondary indicators on chart?
MQL4 does not support "DRAW_ZIGZAG". You have to simulate it in MQL4.
Use a different buffer for each colour, with EMPTY_VALUE in the data for the buffers of the different colour to the one you want plotted.
Look in the CodeBase for an examples of changing colours on plots.
MQL4 does not support "DRAW_ZIGZAG". You have to simulate it in MQL4.
Use a different buffer for each colour, with EMPTY_VALUE in the data for the buffers of the different colour to the one you want plotted.
Look in the CodeBase for an examples of changing colours on plots.
MQL4 supports DRAW_ZIGZAG, I created the indicator which I attach its picture in MQL4 using DRAW_ZIGZAG, The only issue is I cannot change the indicator color for the up and dn directions.
My apologies! When I read your post I assumed you were referring to "DRAW_COLOR_ZIGZAG", even though you wrote it correctly and I even quoted it. The mind plays funny tricks on us old folk.😅
However, what you are requesting, namely a colour change, is in fact a similar functionality of the "DRAW_COLOR_ZIGZAG". So, my statement earlier is still valid in respect that you will need to simulate it with individual buffers for the different colours.
EDIT: But you will have to use a different drawing style, other than "DRAW_ZIGZAG" to switch between the plot colours by making use of the EMPTY_VALUE in the buffers.
My apologies! When I read your post I assumed you were referring to "DRAW_COLOR_ZIGZAG", even though you wrote it correctly and I even quoted it. The mind plays funny tricks on us old folk.😅
However, what you are requesting, namely a colour change, is in fact a similar functionality of the "DRAW_COLOR_ZIGZAG". So, my statement earlier is still valid in respect that you will need to simulate it with individual buffers for the different colours.
EDIT: But you will have to use a different drawing style, other than "DRAW_ZIGZAG" to switch between the plot colours by making use of the EMPTY_VALUE in the buffers.
Note: In this Zigzag indicator sometimes on one single candle the high must connect to low or visa versa. Plz check the picture I attached to find out what I am talking about.
MQL4 does not support "DRAW_ZIGZAG". You have to simulate it in MQL4.
Use a different buffer for each colour, with EMPTY_VALUE in the data for the buffers of the different colour to the one you want plotted.
Look in the CodeBase for an examples of changing colours on plots.
I've searched the code base, for MT5 I found it, but there is no such a zigzag indicator with different colors for MT4.
Then look at the examples of a coloured moving average, and adopt it to a ZigZag.
I also stated that you will have to use a different drawing style and not "DRAW_ZIGZAG". You will have to simulate the equivalent of the ZigZag style using a different drawing style.
I cannot offer you any code sample, because I have no such example to give you nor am I going to put in the work to develop it for you. You will have to research it and think about it to come up with your own code. That is what development is about. To use the different tools available and adapt them to form a solution.
EDIT: You are a freelance developer and sell market products. So doing the development for you for free for something that you might sell as product or use for your freelance jobs does not seem correct.
Then look at the examples of a coloured moving average, and adopt it to a ZigZag.
I also stated that you will have to use a different drawing style and not "DRAW_ZIGZAG". You will have to simulate the equivalent of the ZigZag style using a different drawing style.
I cannot offer you any code sample, because I have no such example to give you nor am I going to put in the work to develop it for you. You will have to research it and think about it to come up with your own code. That is what development is about. To use the different tools available and adapt them to form a solution.
EDIT: You are a freelance developer and sell market products. So doing the development for you for free for something that you might sell as product or use for your freelance jobs does not seem correct.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use