I don't understand MQ4 ...

 
Hi all, i'm just starting with EAs and i must say I am a bit confused ...

For example, just looking at the Moving Average EA example given by Metatrader gives me headaches ... :

Looking at the code, it looks like it is a system that should always be in the market (long above the MA and short below) but the results shown in the Strategy tester are confusing to say the least ... (try it and see for yourself).

So the question I would have is : am i missing something about the code (which is possible since i just started looking into MQ4 language) or is MQ4 just not up to the task ?

I wanted to invest some time to learn MQ4 but i mean, let's be serious, if this language is not even able to cope with a system as straightforward as a MA Crossover, how good can it be ?

Please shed some light ...
 
Looking at the code, it looks like it is a system that should always be in the market (long above the MA and short below)
Not quite
but the results shown in the Strategy tester are confusing to say the least ... (try it and see for yourself).
The results correspond to expected ok.
So the question I would have is : am i missing something about the code (which is possible since i just started looking into MQ4 language) or is MQ4 just not up to the task ?
One signal produce one execution - either enter a position if there is no open positions or close position otherwise.
I wanted to invest some time to learn MQ4 but i mean, let's be serious, if this language is not even able to cope with a system as straightforward as a MA Crossover, how good can it be ?
Good enough for a highly sophisticated trading system distributed over a few workstations running in Master-Backup mode for reliability made by means of MQL4 only.

You could invest more efficiently as well while concentrating on the trading system specifications, that's for sure :)

Regards,
mqlexpert [at] gmail [dot] com
 
Thanks for your answer Irtron.

In order to back up your assertions maybe you could just give us an example code that would, let's says : implement a basic ma crossover strategy (either long above ma or short below ma) that runs as expected (ie does not miss a trade) in the strategy tester ?

That should be straightforward enough for an "mqlexpert" :-)

I'll be happy to dive into MQL thoroughly once i'm as convinced as you that it is worth it.

regards,
bob
 
In order to back up your assertions maybe you could just give us an example code that would, let's says : implement a basic ma crossover strategy (either long above ma or short below ma) that runs as expected (ie does not miss a trade) in the strategy tester ?

That should be straightforward enough for an "mqlexpert" :-)


Come on, don't be ridiculous. What kind of challenge is this? :)
That is too straightforward. Exactly a task for a rookie.
 
If it really is that straightforward why don't you do it then ?
 
If it really is that straightforward why don't you do it then ?

Not a problem at all. If you really want to have this strategy implemented in mql4 contact me directly please.
No need to play childish game here.
 
Irtron,

I believe many rookies would be more than happy to have privilege of being educated by an MQL expert, and posting some nice, straightforward code here would be a great start.

I'm not playing any game here, nor trying to implement any strategy : I'm just trying to get a better understanding of the MQL language.

Looking forward for your input.

Regards
 
"I believe many rookies would be more than happy to have privilege of being educated by an MQL expert, and posting some nice, straightforward code here would be a great start."

Too funny...

Try

http://www.google.com/search?hl=en&safe=off&rlz=1T4GGLJ_enUS219US219&q=mql4+programming+tutorial
 
MQL4 is like C language, if you know C, you can program in MQL4, so learn C first.... i can tell you that for a C programmer, there is no problem to understand any logic in the cross-over code.... and if you have a headache reading Code then you shoud avoid programming....
 
lyes,

I think you misunderstood my initial post. Maybe you should learn a little less of C and a little more of English.

To make it simple for you to understand, what I'm looking for is just for someone to show me a simple MA Crossover EA that DOES WHAT IT IS SUPPOSED TO DO, ie works as expected in the Strategy Tester and in Live Trading.

In other softwares, this kind of strategy can be programmed effectively with less than 10 lines of code.

I'm still waiting for a meaningful answer from "MQL Expert" Irtron. Maybe you can do better ?

Cheers


ps1 : I know C++

ps2 : IMHO, implementing a C-like language to program trading strategies is a bit "over the top" and in clear violation of the KISS principle. Platforms like MetaStock, TradeStation etc "do the job" with simple and effective languages.
 
Are you still waiting?
Reason: