3 Buys

 

When I make 3 market orders in a row to buy 1 lot EURUSD with different takeprofit settings, the position indicates that I bought 3 lots and the t/p value takes the value of last (highest) t/p entered (however, the history of orders indicates the correct t/p for the three orders).

When the price reaches the t/p values, the 2 lower t/p values do not trigger. Only the highest one triggers to finish off the position (the one materialized on the graph with a red dotted horizontal line).

To me this is not really hedging and it should be allowed, as it is with MT4. 

Is there any trick to get around this ? 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
 
danielth :

When I make 3 market orders in a row to buy 1 lot EURUSD with different takeprofit settings, the position indicates that I bought 3 lots and the t/p value takes the value of last (highest) t/p entered (however, the history of orders indicates the correct t/p for the three orders).

When the price reaches the t/p values, the 2 lower t/p values do not trigger. Only the highest one triggers to finish off the position (the one materialized on the graph with a red dotted horizontal line).

To me this is not really hedging and it should be allowed, as it is with MT4. 

Is there any trick to get around this ? 


You can use pending orders to set multiple TPs and SLs on a single positions.
 

I have done this but it did not work. I have the same issue. I have pending orders got filled with same entry and stop. When i adjusted stop loss of the 1st position, the second one came along with it. I got no choice but to exit the trade with both entries.

Anyone who uses the same strategy will definitely wont like mt5 unless this issue is resolved. But its still in its beta phase, so i think its going to be fine.

 
danielth posted  :

When I make 3 market orders in a row to buy 1 lot EURUSD with different takeprofit settings, the position indicates that I bought 3 lots and the t/p value takes the value of last (highest) t/p entered (however, the history of orders indicates the correct t/p for the three orders).

When the price reaches the t/p values, the 2 lower t/p values do not trigger. Only the highest one triggers to finish off the position (the one materialized on the graph with a red dotted horizontal line).

To me this is not really hedging and it should be allowed, as it is with MT4. 

Is there any trick to get around this ? 

hi, danielth

i want to ask

you say that mt5 only close the highest t/p , but what the lots mt5 closed ?  1 lot or  3 lot be closed ?

 
chiwing:

hi, danielth

i want to ask

you say that mt5 only close the highest t/p , but what the lots mt5 closed ?  1 lot or  3 lot be closed ?

3 are closed.

But Enivid gave the trick to solve this (use opposite pending orders, and it works).

In fact I do differently now. I have written an EA to send oppposite orders when Bid reaches the desired price level.

 
danielth:

3 are closed.

But Enivid gave the trick to solve this (use opposite pending orders, and it works).

In fact I do differently now. I have written an EA to send oppposite orders when Bid reaches the desired price level.

using differnet TP by sending oppposite orders , needing a variable or some checking for checking whether the action be taken?

right?

if ((_Bid >= target) &&  (have_not_send==true)) 

      send_oppposite_orders ();

 
kelly:

using differnet TP by sending oppposite orders , needing a variable or some checking for checking whether the action be taken?

right?

if ((_Bid >= target) &&  (have_not_send==true)) 

      send_oppposite_orders ();

Yes,

See also the forum topic about the same subject :  COMBAT to auto-combine the order 

Reason: