Get the ZigZag last High and Low
- Loop starting at the latest until you read a non-zero/non-EMPTY_VALUE value.
- Continue until you read the next value.
- Now you have a high and a low.
- 2019.03.05
- www.mql5.com
Thank you for your reply William. It is possible to give a link to a example or code?
- Loop starting at the latest until you read a non-zero/non-EMPTY_VALUE value.
- Continue until you read the next value.
- Now you have a high and a low.
OK
HERE YOU ARE
Thank you very much
CopyBuffer(ZigZagHandle,0,0,20,ZigZagBuffer); for(int x=0;x<20;x++) { if(ZigZagBuffer[x] != EMPTY_VALUE && ZigZagBuffer[x] != 0.0) { if(n<10) { p0 = NormalizeDouble(ZigZagBuffer[1],5); } } }
So far I have reach this point I would like to get the last 3 non-zero values from the zigzag indicator buffer. Can Someone help me with it.
So far I have reach this point I would like to get the last 3 non-zero values from the zigzag indicator buffer. Can Someone help me with it.
CopyBuffer(ZigZagHandle,0,0,20,ZigZagBuffer); for(int x=0;x<20;x++) { if(ZigZagBuffer[x] != EMPTY_VALUE && ZigZagBuffer[x] != 0.0) { if(n<10) { p0 = NormalizeDouble(ZigZagBuffer[1],5); } } }
What is the variable n?
What is the variable p0 and why, no matter what the loop does it is given the value of the 2nd element of ZigZagBuffer?
Please clarify if you are working with MQL4 or MQL5.
You have posted your topic in the MQL4 section.
Greetings community
I would like to ask how can I get the last zigzag high and low and display on the screen using the comment().
Anyone can help please??
Best Regards