You know that double f(double x) {return x*x; } or using MQL's MathPow(base, power) does the job.
Although good programming skills are required for making good EAs, I woud think that the focus here is not programming style, but research and implementing strategies to make profit.
The problem is that I have several nested function calls that are slowing down the EA @ runtime. I would like to solve this @ compile-time, by using the pre-processor. Otherwise I have to maintain several different EAs with cut&pasted code, which leads to a mess when I make bug-fixes :)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
stupid question, how do I do the following in MQL4?
#define f(x) x^2
if I can't do this, can I create a function pointer? It seems that function calls are very expensive with the MQL4 compiler