-
Because the MACD are all positive.
-
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 after three years?
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)
-
Because the MACD are all positive.
-
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 after three years?
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)
This MACDTrue indicator is a positive/negative double depending on above or below the 0 line.
macd>0 is positive double
macd<0 is negative double
IE: Printing out the variables results like this:
below 0 = EURUSD,H1: histo -5.722246927945219e-05
if (histo > 0) { upcount= i; } else return; //this returns upcount as expected //Versus if (histo > 0) { upcount= i; } //this one does not.I understand why "i" will keep counting up to 49, but I do not understand why upcount continues to get assigned i++ even after the condition is false.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Help me correct my logic on this.
Without the else return I don't really understand why upcount continues to get assigned i++ up to 49 where the for loop terminates.
When the if condition is false shouldn't it stop assigning i++ count to downcount ?
Please advise.
Thanks