New MetaTrader 4 Client Terminal Build 216

 
New MetaTrader 4 Client Terminal Build 216:
  1. Tester: Provided correct initialization/deinitialization of libraries used by the Expert Advisor under test, at repeated passes and at optimization.

  2. Tester: Fixed the triggering of Sell Limit orders when tested by open prices.

  3. MQL4: Eliminated memory leaks occurring when referencing outside a string array.

  4. When placing an order by Market Execution, disabled the feature of entering the values of SL and TP, the corresponding fields are blocked.

  5. Fixed error of losing the data of off-line charts when attaching MQL4 scripts to such charts.

The live update is available through the LiveUpdate system.

 

Hello,


4. When placing an order by Market Execution, disabled the feature of entering the values of SL and TP, the corresponding fields are blocked.

Does it mean that:

OrderSend(Symbol(), OP_BUY, 1, Ask, 3, Ask-25*Point, Ask+25*Point, "My order #2", 16384, 0, Green);

is now interpreted as:

OrderSend(Symbol(), OP_BUY, 1, Ask, 3, 0, 0, "My order #2", 16384, 0, Green);


And so you have to do that, after opening order:

OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice()-25*Point, OrderOpenPrice()+25*Point, 0, Green);

Humm, I think that can break a few EA...


Regards,

GdA.

 
There are 3 kinds of execution - Instant Execution, Request Execution and Market Execution. Please do not mix these executions. Market Executions used for futures (not forex!) and You don't know open price before order sending. Therefore You cannot set sl and tp in advance
 
stringo:
There are 3 kinds of execution - Instant Execution, Request Execution and Market Execution. Please do not mix these executions. Market Executions used for futures (not forex!) and You don't know open price before order sending. Therefore You cannot set sl and tp in advance

If ist is like you say "Market Executions used for futures (not forex!)", why does point 4 of release notes contain something related to it?

We are at forex, right?


My conclusion is, that gda-fx is basically right.

If you want to put a SL and TP to a OP_BUY or OP_SELL order, you'll have to do a OrderModify().


That will kill tons of EAs, if they cannot be modyfied for this.

 

Sammy, do You understand what You write? Ask your broker. Market execution forbids to set sl and tp when order send because open price is undefined.


If You trade forex (not futures) You never work with Market Execution. Are they your tons of EAs? You are great mql4-programmer

 

Stringo, do you understand what you write?


"4. When placing an order by Market Execution, disabled the feature of entering the values of SL and TP, the corresponding fields are blocked."


Please keep your ignorance to yourself.

 

Another customer relations triumph! Metaquotes, do you think it may be time to employ a translator?

All 'stringo' had to say was, 'the behavior will not change for forex', instead the name calling starts almost instantly.

 

Hello,


As far as I know, finex.com are trading forex with orders by market. By the way, I had to modify my EAs to make them taking successful orders on their demo accounts.

So, now I understand that SL and TP are now just ignored, instead of having an error in the particular case of orders by market.


I think this is something dangerous. If you are using an EA unable to adjust SL/TP, it can open an order and believing that SL et TP are set...

Once again, robustness is the first rule for writing sucessful EAs...


I suppose that no API exists in MQL4 allows to know is order are by market or instant execution. :-(


Regards,

GdA.

 

We really need an API to distinguish instant execution and market execution, as many Forex ECN brokers are using market execution.

Moderator, please take this suggestion to MQL developers. Thank you.

 
gda-fx:

Hello,


As far as I know, finex.com are trading forex with orders by market. By the way, I had to modify my EAs to make them taking successful orders on their demo accounts.

So, now I understand that SL and TP are now just ignored, instead of having an error in the particular case of orders by market.


I think this is something dangerous. If you are using an EA unable to adjust SL/TP, it can open an order and believing that SL et TP are set...

Once again, robustness is the first rule for writing sucessful EAs...


I suppose that no API exists in MQL4 allows to know is order are by market or instant execution. :-(


Regards,

GdA.


Ya, for ECN and STP model that uses Market Execution, the solution is what was stated:


SL and TP to a OP_BUY or OP_SELL order, you'll have to do a OrderModify().


And for newbies, no need to ask brokers if they are Market Execution or

Instant Execution. Just double click the pair and try to do a trade.

What does it say? What it says is what that broker is doing.

It will either say Market Execution or Instant Execution.

If they are advertising themselves as ECN but you see Instant Execution,

they are lying to you. STP also usese Market Execution so when you

buy EAs or write EAs, you have to make sure they are ECN/STP compatible.

Reason: