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
And this post about how to find/fix zero devide: https://www.mql5.com/en/forum/general
There are some functions explanation:
- Collection of useful MT4 functions for coding by wolfe.
- Professional MM function by Nicholishen.
- Money managment function by Kalenzo.
- some simple MM codes.
- FILE_READ | FILE_WRITE function.
- DefindTrade(..) function by phoenix.
- Date format function.
- alert display function.
- sleep() function.
- Function for high and low.
- iCustom function: good threa by Codersguru.
- email/sms functions links.
- all the functions by Codersguru website.
- Function that returns an Array.
- IsStopped( ) function.
- How to use Hour() function.
- Function to effectively close all orders.
- Alert Once.
- Alerts: many functions and examples.
- Very IMPORTANT for ALL MTF indicators.
- Easy iCustom and Alerts!: very good thread by Codersguru.
- Highest high.
- How to alert only at candle close.
- icustom function links.
- zero devide fixing.
- zero devide fixing totally.
- the other money management functions.
- how to code one order per MetaTrader, or one order per simbol (eurusd, gbpusd ...), or one order per chart, or one per candle.
hot keys in MetaTrader:
https://www.mql5.com/en/forum/178343
https://www.mql5.com/en/forum/172885
https://www.mql5.com/en/forum/176626
If broker added one more digit?
https://www.mql5.com/en/forum/179191
Finding the current Session High.
Coding a custom indicator without the mq4 file.
Uncommonly error
Hi folks,
I have been coding a EA, and I faced a uncommonly error. So, I'd like to ask your help with this error on MT4, which I believe some of you, in all your experience, may already have faced the same.
Reading the entire EA may be impractical, source code is very large.
After successful compilation, in the tester, MT4 journal tells the following error
Time: 2011.01.28 23:35:36
Message: 2007.07.13 00:00 InterCandles EURUSDFXF,H4: stack overflow.
Even raising stack size to heavens via
#property stacksize 167692160
which, I believe, allocates 16MB of memory, the error endures.
Did anyone faced the same problem of "stack overflow" in the tester, or can point out whether the problem is MT4 internal, or in the EA (possibly in array, nested declarations, too large ex4 file, etc)?
I appreciate your helping hand and I am sorry for taking your time.
Thank you.
Solution of the problem
Well, before someone reply, I found the solution.
Before using the function, just after tester loads the EA --which links the library attached--, the message "stack overflow" is shown in journal.
Problem found with the function named "power", in the attached file. My conclusions are the following:
1) Certainly there is no problem with its name; no MQL function collision in symbol table of the EX4. Other labels were tested.
2) Apparently no limit of functions was reached. More functions were added after removing the problematic function and error did not occurred. Works properly only by removing this function, not only unlinking in the EX4 file through the MT4 compiler.
3) Recursion is executed via many calling and results are left in the stack. Stack grows linearly asymptotically as argument `exponent' exponentially grows. Potentially, stack may reach its limit and go on overflow. The "stack overflow" error appears independently of the execution of this function.
Therefore, I induce MT4 compiler may have a device detecting [some classes of] recursion which are not allowed in the language avoiding potential stack overflow during EA execution.
Details (settings) of EA displayed on chart
making VERY SURE an ordermodify() is Successful
Global Variable Replacement
how to detect if file exists: I know that in a EA we can try to read a file using FileOpen(...) and get the error using ...