You should fix this code in accordance with your taste because this is not our source code.
Rosh:
You should fix this code in accordance with your taste because this is not our source code.
You should fix this code in accordance with your taste because this is not our source code.
Excuse me but I don't understand.
The question was why the MQL editor totally ignores "return(true)" and jumps to "return(false)" at end of code block. It shouldn't ever happen! I though that we have fully functional version of MQL currently.
Regards
There is no problem with MetaEditor. Just problem with source code (or programmer writing this code). Just insert one return statement
bool checkForBuy() { if(o[gX]>c[gX])//o & c are arrays of previous open and close values { gX++; return(checkForBuy()); } else { if(gX>0 && c[gX-1]<cmal(gX-1))//cmal returns some moving average value return(true);//put next BP here and look what happens } return(false); }
Thanks stringo. I got it! :)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I get mad becouse of this problem. Please look at my OnTick() f-ion:
And here is the checkForBuy():
I noticed that after return(true) in checkForBuy() f-ion. It IMMEDIATELY JUMPS TO return(false) and that is why f-ion ALWAYS returns FALSE.
I have absolutely no idea why this happens. Please point my mistake. Is it MetaQuotes fault?
Regards
Tilo