MQL4 / MQL5 intro needed, where do i find a SIMPLE guide?

Oct 01, 2012 at 13:46
1,924流覽
5 Replies
會員從Aug 02, 2012開始   5帖子
Oct 01, 2012 at 13:46 (已編輯Oct 01, 2012 at 13:27)
Hello!

First: shall i skip MQL4 at all and move to MQL5 ?

Second: the MQL4 language is not very intuitive to me.
I am an experienced coder in non fx related languages.

I found ´my first EA´ for MT4 somewhere on the net,
modified it and got stuck rather quickly.

I just wanted to code something like:

  If last third, fourth and fifth time frame price distance to EMA is greater than X pips
  and current price is crossing EMA than SELL something.

Got various error messages and found no way to do a step by step analysis what the code is calculating.
Same for error catching by executing the SELL command.

Do you have any links, any advice or better Google search terms?
Enjoy the process
會員從Nov 21, 2011開始   1718帖子
Oct 01, 2012 at 13:52
Hey,

There is MQL4.com... I guess some of programmers will help out out even for some MQL5 issues.

Anyway I would not create an EA with MQL5 as Hedging is forbidden with this new crap version.
會員從Jul 18, 2010開始   6帖子
Oct 01, 2012 at 21:49
Hey there,
I saw your private message so I thought I could try to be of some help.

First: Personally, I prefer MQL4; there are far more resources and open-source codes available for MQL4. As well, more brokers support it and will continue to as well. Likewise there are some great APIs available to send signals to other platforms as well, such as Interactive Brokers, Dukascopy/jForex, etc.

HOWEVER, MQL5 is a much more feature-packed language - so the decision really should be based on the requirements of your program. For instance, MQL5 can handle multi-threading, but MQL4 cannot. This is a problem I've had to work around as my personal program uses A LOT of processing power and running it quick enough in a single thread is very difficult.

Second: The compiler sucks and it is indeed very difficult to pinpoint errors, but that's the reality of the platform unfortunately.
My primary source for MQL information is the MQL4.com forum. So, my standard Google search is:

'bla bla bla site:mql4.com'

This narrows results to those coming from mql4.com. Also, I find that the Russian MQL4 site tends to have better information and more talented programmers - I usually find answers to more complex problems there. So you can narrow that search using

'site:forum.mql4.com/ru/'

Then you can translate results to English using:

https://translate.google.ca/translate?hl=en&sl=ru&u=https://forum.mql4.com/ru/BLA_BLA_BLA
^ Obviously fill in the 'u=' parameter with the Russian forum link.

I recommend, to start, go to https://codebase.mql4.com and in the Expert Advisers section you will see a bunch of free codes in MQ4 format. Look through ones that have similar styles that you would like to make and learn how they are structured. I personally learned the most from reverse engineering others' codes.
Be first, be smarter, or cheat.
會員從Dec 15, 2010開始   795帖子
Oct 04, 2012 at 21:08
Hes telling the truth. MT4 is the most comon to use, BUT, The back testing on multiple processors is a very big deal for effective testing and speed. MT5 can back test fast..perhaps 500% faster and thats very important, esp if your using long time frames ( 12 mionths to 8 years) . You cant make any money with a poor trading EA that fails back testing or takes forever back testing. The code isnt the same on mt5 as with mt4, most programmers cant do both languages. Choose only one and stay with it. I run 3 computers using mt4 for back testing and on each one I will have 3 to 12 mt4 plaforms running. The few mt5 eas (from public mt5 forums can be tested quickly and over very long time frams) without over heatiing your pc.

My current hand built EA can not be back tested at all. It uses mulitple currenclys and neg correlation trading as well as antimartingle. Not even Mt5 can back test it. Program your EA with what you know and test it for errors and save each time you make small changes. Its a very long hard and expensive road to success in forex. AND keep a paper log in a note book.
Click on my Name to see My Live Charts and Bio.
會員從Aug 02, 2012開始   5帖子
Oct 06, 2012 at 14:43
j4byers posted:

I recommend, to start, go to https://codebase.mql4.com and in the Expert Advisers section you will see a bunch of free codes in MQ4 format. Look through ones that have similar styles that you would like to make and learn how they are structured. I personally learned the most from reverse engineering others' codes.

'bla bla bla site:mql4.com'

'site:forum.mql4.com/ru/'


Thanks, i prefer to learn from reverse engineering, but stopped it after five EA samples,
hoping there is a more structured intro somewhere.

Thanks for the idea to translate Russian results, despite online translations often deliver quirky outputs, i will try this!

I was asking for a better search term than ´bla bla´, i know the site filter but good point to the russian search!
Enjoy the process
會員從Feb 10, 2011開始   36帖子
Nov 04, 2012 at 06:51 (已編輯Nov 04, 2012 at 06:52)
That is true to a point.

However we have a product in development that allows MT4 to backtest 700% to 1200% times faster than the usual in-built MT4 backtester. (the variance in speed depends on the complexity of the EA)

It is around 500% times faster than the inbuilt MT5 backtester also.

Its being developed for in-house use at www.CandleFOREX.com but if there is enough interest we may release it to forex traders.



Professor53 posted:
Hes telling the truth. MT4 is the most comon to use, BUT, The back testing on multiple processors is a very big deal for effective testing and speed. MT5 can back test fast..perhaps 500% faster and thats very important, esp if your using long time frames ( 12 mionths to 8 years) . You cant make any money with a poor trading EA that fails back testing or takes forever back testing. The code isnt the same on mt5 as with mt4, most programmers cant do both languages. Choose only one and stay with it. I run 3 computers using mt4 for back testing and on each one I will have 3 to 12 mt4 plaforms running. The few mt5 eas (from public mt5 forums can be tested quickly and over very long time frams) without over heatiing your pc.

My current hand built EA can not be back tested at all. It uses mulitple currenclys and neg correlation trading as well as antimartingle. Not even Mt5 can back test it. Program your EA with what you know and test it for errors and save each time you make small changes. Its a very long hard and expensive road to success in forex. AND keep a paper log in a note book.
登錄 / 註冊 to comment
You must be connected to Myfxbook in order to leave a comment
*商業用途和垃圾郵件將不被容忍,並可能導致帳戶終止。
提示:發佈圖片/YouTube網址會自動嵌入到您的帖子中!
提示:鍵入@符號,自動完成參與此討論的用戶名。