even i use iCustom i cant get price of last zigzag
can some one help plz
CopyBuffer
and CopyBuffer does not existe in mql4
How to get time or shift of zigzag top (or bottom) - Symbols - Expert Advisors and Automated Trading - MQL5 programming forum< (2021.08.25)
realy thanks bro for u help but a both codes does not work
the first code block my EA and the second code have error
So fix it. Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
Code debugging - Developing programs - MetaEditor Help
Error Handling and Logging in MQL5 - MQL5 Articles (2015)
Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010)
When you say the price, do you mean the latest extension or the end of the last leg?
If you mean the values for each leg extension, I don't think its possible except by saving them when they occur in real time....
This code gives the last extension bar and direction from which you could get the prices.
string txt=""; double dir=-1; string sym=_Symbol; int period=_Period;
custom="zigzag"; for(int x=1;x<500;x++){ if(iCustom(sym,period,custom,0,x)==0)continue; if(iCustom(sym,period,custom,1,x)==0) dir=0;else dir=1; txt=StringConcatenate(txt,"bar ",x," ",iTime(sym,period,x)," dir ",dir,"\n"); } Comment(txt);
ZigZag only has one buffer. The second call is bogus.
How to get time or shift of zigzag top (or bottom) - Symbols - Expert Advisors and Automated Trading - MQL5 programming forum #5 (2021)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
even i use iCustom i cant get price of last zigzag
can some one help plz