-
“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — could be anything, meaningless.
We can't read your mind nor see your machine; only what you give us on this forum.
How To Ask Questions The Smart Way. (2004)
When asking about code
Be precise and informative about your problem -
Always post all relevant code (using Code button) or attach the source file. We have no idea what your x1-x7 are typed as. We have no idea what i is or what iClose is returning.
-
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)
-
“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — could be anything, meaningless.
We can't read your mind nor see your machine; only what you give us on this forum.
How To Ask Questions The Smart Way. (2004)
When asking about code
Be precise and informative about your problem -
Always post all relevant code (using Code button) or attach the source file. We have no idea what your x1-x7 are typed as. We have no idea what i is or what iClose is returning.
-
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)
Thank you for your comment. I have found the solution. x2 must be different zero
//-- x1=iClose(NULL,0,i+1); x2=iClose(NULL,0,i+2); x3=iClose(NULL,0,i+3); x4=iClose(NULL,0,i+4); x5=iClose(NULL,0,i+5); x6=iClose(NULL,0,i+6); if(x2!=0) { x7=(x1-x2)*100/x2; }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have a problem with a simple math "double/double" in my system. I've been trying to find an answer but haven't come up with a topic that's exactly what I'm looking for
My code here. I can print value x1,x2,x3,x4,x5,x6 , but x7 doesn't work. Someone can give me the answer, please!