MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading and Strategy Testing Forum

Candlestick Momentum Index Blau_CMI Indicator
Candlestick Momentum Index Blau_CMI
Author: abolk
Screenshot
AUDUSD, H1
Real
Elder Impulse SystemElder Impulse System Try product
Elder Impulse System
Author: elder.com
MQL5 Wizard: Creating Expert Advisors without Programming MQL5 Wizard: Creating Expert Advisors without Programming Subscribe to signal
Golden4x Flood FXDD
86.02%, 79 507.75 USD

// Simple question from newbie in mql. Please help.

To add comments, please log in or register
FxAnomaly82
8
FxAnomaly82 2012.09.09 12:07 

Hi, I started learning mql4 two weeks ago, along the way I noticed mql5 programming is growing.

1. From your perspective : Do i rather stop learning mql4 and switch to mql5 stright away? Or, learn programming in mql4(many helpful articles=learning faster) than just learn how to convert bot to mql5? Which way will you choose? 

2. My trading system consists of pending SendOrder's, but from MA lvls. Is it possible to program bot buying and selling from MA's?

As i searched in web and so far could not find article about that. All orders are made upon closing,openning prices ,etc or from static levels, here lvl change every bar close.

But nothing like for examp. SendOrder(Bid=iMA*point)  just in short description. Or maybe use Ordermodify which will modify Bid by MA lvls refreshed every close bar....Signal will be MA's cross, than pending order from MA to sell or buy.

Is such a order from MA automaticly possible?

Please help. Thanks.

Best regards.   

MQL5 Cookbook: Position Properties on the Custom Info Panel
This time we will create a simple Expert Advisor that will get position properties on the current symbol and display them on the custom info panel during manual trading. The info panel will be created using graphical objects and displayed information will be refreshed at every tick. This is going to be much more convenient than all the time having to manually run the script described in the previous article of the series called "MQL5 Cookbook: Getting Position Properties".
Liping Wang
2891
MarketArt 2012.09.18 12:57  

If you just started, then you better switch to mql5.

Anatoly Kotlov
353
divenetz 2012.09.18 19:15  
FxAnomaly82: 

1.  Which way will you choose? 

2. My trading system consists of pending SendOrder's, but from MA lvls. Is it possible to program bot buying and selling from MA's?

1. Learn MQL4 (much easier). Most brokers have it. MQL5 is only for championship.

2. No pending orders. Use time series like iMA(i), close(i) in onTick() function. Read more codebase.

Pawel W.
566
Enigma71fx 2012.09.18 21:34  
FxAnomaly82:

Hi, I started learning mql4 two weeks ago, along the way I noticed mql5 programming is growing.

1. From your perspective : Do i rather stop learning mql4 and switch to mql5 stright away? Or, learn programming in mql4(many helpful articles=learning faster) than just learn how to convert bot to mql5? Which way will you choose? 

There is also a lot of articles for MQL5 -> http://www.mql5.com/en/articles

 

divenetz: 

1. Learn MQL4 (much easier). Most brokers have it. MQL5 is only for championship.

2. No pending orders. Use time series like iMA(i), close(i) in onTick() function. Read more codebase.

Ad.1. Disagree. There are already brokers offering MT5 for live trading (just to mention Alpari), so it is not only for championship. IMHO better to learn MQL5 - more prospective language and much more powerful - the more will you become fluent in coding, the more you will appreciate the advantages of MQL5. Personally I'd never come back to MQL4, even just for one reason: no object-oriented programming in MQL4.

Ad.2. What do you mean by "no pending orders"?? Of course there are both market and pending orders in MetaTrader5 -> http://www.metatrader5.com/en/terminal/help/trading/general_concept/order_types

Joaquin Poudereux
348
yokinfx 2012.10.01 12:06  
FxAnomaly82:

Hi, I started learning mql4 two weeks ago, along the way I noticed mql5 programming is growing.

1. From your perspective : Do i rather stop learning mql4 and switch to mql5 stright away? Or, learn programming in mql4(many helpful articles=learning faster) than just learn how to convert bot to mql5? Which way will you choose? 

2. My trading system consists of pending SendOrder's, but from MA lvls. Is it possible to program bot buying and selling from MA's?

As i searched in web and so far could not find article about that. All orders are made upon closing,openning prices ,etc or from static levels, here lvl change every bar close.

But nothing like for examp. SendOrder(Bid=iMA*point)  just in short description. Or maybe use Ordermodify which will modify Bid by MA lvls refreshed every close bar....Signal will be MA's cross, than pending order from MA to sell or buy.

Is such a order from MA automaticly possible?

Please help. Thanks.

Best regards.   

Keep on learning MQL5. You'll be grateful when you start doing things you hadn't imagined.

It is not only that it is much more powerful than MQL4, it is that you can't do a lot of things in MQL4 and you can in MQL5. For example, backtest and optimize multi currency EAs or more precise backtests and optimizations due to the fact that the spread IS in the histories.

MQL5 is a bit more difficult to learn, but it really worths the effort.

And another reason: MT5 is still growing and spreading faster than MT4.

In MT5 you can do everything you did in MT4, regardless of what people will tell you. The truth is that for doing some things (like discriminate orders and deals with magic) you'll have to invent your own way.

Regarding your question 2.- I think that the key of your question is not "Pending Orders", which obviously can be done, it is "both buying and selling" . In MQL5 you have the concept of Position , which can be only long or short for a specified symbol. This virtually prevents you from opening at the same time a long and a short in one symbol. The truth is that there's an article in this site that helps you achieve this, thanks to "virtual orders".

To summarize, you can do in your ea anything you can imagine. The limit is your imagination and your programming skills.

/
To add comments, please log in or register