I give up on split position

 

There must be something essential that I dont understand.

I have now tried 2 different methods to place 2 trades with different TP-levels.  Split position.

1. Just place  2 trades with differen TP-levels. Does not work, both trades ends up with second trades TP

2. Place 2 trades without TP. and add TP later. Does not work. Position modify ends up with the same TP for both. Looking at parameters this is not surprising

   position modify does not have parameter for "Ticket", just "Symbol" so it cannot distinguish between the orders I have placed.

Solution anyone?

This problem has had me occupied for at least 3 days now.

I have considered placing 2 trades separated by a 1 minute bar but that seems like a cumbersome method to obtain a split position.

In the end my method might even be spilt into 3 positions, the last one having a trailing stop

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
 

Place 2 opposite pending STOP or LIMIT deals, each with the wanted volume and entry point in corelation to the TP of each one.

For instance, if your position is BUY 1 LOT, place SELL LIMIT 0.5 LOT with 1st TP, and 2nd SELL LIMIT 0.5 LOT with 2nd TP 

 
amir_avatar:

Place 2 opposite pending STOP or LIMIT deals, each with the wanted volume and entry point in corelation to the TP of each one.

For instance, if your position is BUY 1 LOT, place SELL LIMIT 0.5 LOT with 1st TP, and 2nd SELL LIMIT 0.5 LOT with 2nd TP 

HI,

Not sure what you mean with "Opposite" in this context. And I really want "instant execution". I have been thinking of placing 2 pending orders with a slight difference in entry price but it seems like

a "roundabout" way of doing it. Or do you mean to place one SELL LIMIT and one SELL_STOP really tight?

 
amir_avatar:

Place 2 opposite pending STOP or LIMIT deals, each with the wanted volume and entry point in corelation to the TP of each one.

For instance, if your position is BUY 1 LOT, place SELL LIMIT 0.5 LOT with 1st TP, and 2nd SELL LIMIT 0.5 LOT with 2nd TP 

Hi again.

You got an idea how to split in 3? I have 2 fixed TP. Since the EA is working in a trending market and with the trend there is a high degree of probability

of a continuation of the trend. A trailing stop could be an interesting add on

 
ingvar_e:

HI,

Not sure what you mean with "Opposite" in this context. And I really want "instant execution". I have been thinking of placing 2 pending orders with a slight difference in entry price but it seems like

a "roundabout" way of doing it. Or do you mean to place one SELL LIMIT and one SELL_STOP really tight?

In same currency you can have just one position, each position has one TP - it means just one TP for the whole position, and it means no instant execution possible.

And what do you mean by instant execution?

You can place the "far" TP with the position opening (at the buying or selling time as a position TP) and the "closer" TP using a LIMIT order with the wanted entry price and partial volume. 
 
amir_avatar:
In same currency you can have just one position, each position has one TP - it means just one TP for the whole position, and it means no instant execution possible.

And what do you mean by instant execution?

You can place the "far" TP with the position opening (at the buying or selling time as a position TP) and the "closer" TP using a LIMIT order with the wanted entry price and partial volume. 

  So I cant do what I want to do. Just one position. And I have been snooping around on the internet.  No hedging possible in MQL5 it seems like. I am backing down to MT4. MQL5. Nice language

but it cant do what I need.  3 man weeks more or less lost.

 
amir_avatar:

Place 2 opposite pending STOP or LIMIT deals, each with the wanted volume and entry point in corelation to the TP of each one.

For instance, if your position is BUY 1 LOT, place SELL LIMIT 0.5 LOT with 1st TP, and 2nd SELL LIMIT 0.5 LOT with 2nd TP 

  Ah, I got what you actually meant.

 For a split in 3 sell orders place a trade for 1.5 lots. Then place limit buy orders at the 3 different TP positions of 0.5 lots. OK, that sounds like a OK solution.

  Misunderstood you at first. No hedging though. I will sleep on the desicion on weather go back to MT4 or not. There are Pros and Cons.

 Thanks anyway :-)

 
ingvar_e:

  Ah, I got what you actually meant.

 For a split in 3 sell orders place a trade for 1.5 lots. Then place limit buy orders at the 3 different TP positions of 0.5 lots. OK, that sounds like a OK solution.

  Misunderstood you at first. No hedging though. I will sleep on the desicion on weather go back to MT4 or not. There are Pros and Cons.

 Thanks anyway :-)

Descision made.

 - No Hedging. at least not in a straightforward way.

 - Hardly any brokers has live MT5 accounts

Back to MT4.