Split orders

 

Hello folks!

Today's question is:


is it possible to split an open position in two different ones?


You may say: "dude... why do u need such thing?!?!??"

...and here it comes why....


Suppose you have an open position, say 1.00 lot.

Suppose you want to close it when it reaches a certain price.

The safest way to do that is to use TP as if you code an EA which will watch the order for you and close it when the price is reached, you cant be sure that the order will close at the given price due to slippage.

In addition... if the market moves very fast in that particular moment you cant be sure that the position will be closed at all (unless Ur EA is coded really well)!!!

So, placing hard TP is the way to go. We are happy with that :)


BUT...

...what if you want to close by TP only part of the position at a given price!?!?!?!?

That is my problem :(


Say I want to close 75% of the order... in our case would be 0.75 lots and 0.25 would be left open and running for more profit.

As described before we should use TP to ensure cashing the profit at the right price... but as far as I know TP works on the whole size of the position and not just for part of it :(


...so I thought... if once the order is placed I can split into two different positions then I can set TP on one of them and leave the other free under management of my EA.

Easy :)

I think this is the only way to do it properly cause you cant for example open two different positions with OrderSend as you would not be sure that they got opened at the same price and this is a key factor if you want to do your math correctly.

Any different solution/approach to this problem is welcome... fell free to suggest!



Back to may idea of splitting: I've heard some guy talking about this splitting thing but I couldnt find any refrence in MQL4 documentation.

So, if anyone has info abt that please share!!! :)



Cheers,

Zyp [workingfulltimetomaketheworldabetterplace]

 
Zypkin wrote >>

Hello folks!

Today's question is:

is it possible to split an open position in two different ones?

yes, and it is quite normal thing to do; do a search on partial close orders, lots of thread on them

eg 'How do I close only some lots of an open position, when reaching some pip targets?'

 
ronaldosim:

yes, and it is quite normal thing to do; do a search on partial close orders, lots of thread on them

eg 'How do I close only some lots of an open position, when reaching some pip targets?'

Nop.


I'm not talking about closing a part of the position.

I'm talking about splitting it into two different orders and manage them separately :)

 
Zypkin:

Nop.


I'm not talking about closing a part of the position.

I'm talking about splitting it into two different orders and manage them separately :)

You may ask:

1) why U do not just open two different orders then?

2) why closing part of the order is not just good enough?


Because:

1) Cause I cant be sure that opening price will be the same unless they are pending orders... and at the moment I am not considering to use pending orders.

2) cause I need to use TP to be sure the order gets closed exactly at the price I decide... I dont want any slippage or delay in the handling of the request.


So what I do need is to have two identical orders (except for the size) on which I can set different TP.

How to do that?!?!!?


Zyp

 
Zypkin wrote >>

You may ask:

1) why U do not just open two different orders then?

2) why closing part of the order is not just good enough?

Because:

1) Cause I cant be sure that opening price will be the same unless they are pending orders... and at the moment I am not considering to use pending orders.

2) cause I need to use TP to be sure the order gets closed exactly at the price I decide... I dont want any slippage or delay in the handling of the request.

So what I do need is to have two identical orders (except for the size) on which I can set different TP.

How to do that?!?!!?

Zyp

ok, i tried reading yr sentences and still cant understand why a partial close will not work;

Let's send an order of lot size 1.00

1. the order will have the same open price (that's what u want)

2. the order can have no TP so essentially it will not close by TP

3. i can now do a parital close at 75%. so 0.75 lot will be closed when a certain TP (internally set by the EA) is reached

4. u are now left with 0.25 lot with an open TP which u can close by whatever means u like

so it is still a partial close of order.

if us send two orders, u may not get the same open price which is what u do not want. i thot the partial close is elegant.

 
ronaldosim:

ok, i tried reading yr sentences and still cant understand why a partial close will not work;

Let's send an order of lot size 1.00

1. the order will have the same open price (that's what u want)

2. the order can have no TP so essentially it will not close by TP

3. i can now do a parital close at 75%. so 0.75 lot will be closed when a certain TP (internally set by the EA) is reached

4. u are now left with 0.25 lot with an open TP which u can close by whatever means u like

so it is still a partial close of order.

if us send two orders, u may not get the same open price which is what u do not want. i thot the partial close is elegant.


...sorry for the late in reply.

The difference is in point (3)... and there is also the flaw in the system you are proposing to use.

You rely on the fact that an EA can monitor the price action and close an order EXACTLY at a give price. This works in the strategy tester but in real life it's almost sure the closure will be requoted so you cannot really compare this approach to a hard TP.

Working with small lots it's essential that opening prices and closing prices are an exact match with what I expect.


I solved this problem by using pending orders.

I had to setup a procedure to calculate in advance my opening prices but I think it was worth the time.

Now I open two separate pending orders, one with TP and one free. The size of the orders is precalculated too (i.e. 0.75 and 0.25).

When the big order closes I change SL on the other according my calculations... et voilà :)


So far it's working great :)


Cheers,

Zyp

Reason: