Download MetaTrader 5
To add comments, please log in or register
Order the development and track its status via your mobile phone.
Carl Schreiber
5927
Carl Schreiber 2015.06.08 19:03 

Hi,

I just have got two different answers from two broker about partial order closing.

One said it is not possible to close 70% of the lots at e.g. target and the residual 30% by a trailed stop, 

the other one of course you can but we will close 100% and open a new order with 25% of the initial lotsize and you'll have:

~ "no financial advantages or disadvantages in relation to commissions, as well as in relation to course development" (my translation).

Can any body confirm: "no financial advantages..."?

I asked whether the following calculation is wrong and why:

Set-up:

- Buy 1 Lot, Sell

- Commision: 10,-/Lot,

- Spread 20

- Buy 1: 100 (ask), 80 (bid)

- Exit 1: 150 (ask), 130 (bid)

- Exit 2: 200 (ask), 180 (bid)

Case-1, 2 independent orders or open 1-Lot, close 0.7 lot @ 130 finally exit at 180:

- Order-1: (130-100 - 10)*0.7 = +14.-

- Order-2: (180-100 - 10)*0.3 = +21,-

Total net-profit: +35,- paid commission: 10,-

Case-2:

- Order-1: (130-100 - 10)*1.0 = +20.-

- Order-2: (180-150 - 10)*0.3 = + 6,-

Total net-profit: +26,- paid commission: 13,-

Is there a mistake in my calculation of case 2? If not partial closing if executed this was makes no sense - correct?

Thanks,

Gooly

whroeder1
13593
whroeder1 2015.06.08 22:36  

You can't automatically close 70% using a TP. A) open two orders (not good with commission dealer) or B) do a partial close at the first step no extra spread/commission.

  • You can't use OrderLots()/2 because that is not a multiple of LotStep, and you can't close or have remaining less than MinLot. See my code
  • You are only checking if price may trigger a partial close. You aren't checking if you have already done it.
    • Set a flag in persistent storage (files, global variables w/ flush)
    • I move SL to Break Even+1 before the partial close. That way I know that I already did it.
    • Open two orders.
  • Carl Schreiber
    5927
    Carl Schreiber 2015.06.09 06:41  
    WHRoeder:

    You can't automatically close 70% using a TP. A) open two orders (not good with commission dealer) or B) do a partial close at the first step no extra spread/commission.

  • You can't use OrderLots()/2 because that is not a multiple of LotStep, and you can't close or have remaining less than MinLot. See my code
  • You are only checking if price may trigger a partial close. You aren't checking if you have already done it.
    • Set a flag in persistent storage (files, global variables w/ flush)
    • I move SL to Break Even+1 before the partial close. That way I know that I already did it.
    • Open two orders.
  • Thanks, but I practically don't understand your answer.

    "A) open two orders (not good with commission dealer)" - How?

    For 2 orders (0.7 and 0.3 lot) I would pay a commission (=10.- per 1.0 lot) of 7.- and 3.- so together 10.-

    For 1 order with lot size of 1.0 I would pay as well 10,-. Where am I mistaken?


    "B) do a partial close at the first step no extra spread/commission." - Again, how?

    Both broker wrote they can't/won't partially close an order! One broker offers a 'workaround' by closing the whole order and opening a new one, so how is your way of partial closing? Do you get a new ticket number - to me definite sign that the old order has been closed completely and a new order has been opened.


  • You can't use OrderLots()/2 because that is not a multiple of LotStep, and you can't close or have remaining less than MinLot. See my code
  • ...
  • I know your code but my question wasn't about how to code it is but - what to code. (Btw are you still convinced by this? I can't see any advantage of your various MMODE_s).

    Carl Schreiber
    5927
    Carl Schreiber 2015.06.09 09:58  

    Hi - again,

    this is what I just got from one broker (JFD) Buy:

    Buy

    Exit 1:

    exit 1

    Exit 2:

    Exit-2

    This looks very good :)

    whroeder1
    13593
    whroeder1 2015.06.09 12:44  
    gooly:

    Thanks, but I practically don't understand your answer.

    "A) open two orders (not good with commission dealer)" - How?

    For 2 orders (0.7 and 0.3 lot) I would pay a commission (=10.- per 1.0 lot) of 7.- and 3.- so together 10.-

    For 1 order with lot size of 1.0 I would pay as well 10,-. Where am I mistaken?


    "B) do a partial close at the first step no extra spread/commission." - Again, how?

    Both broker wrote they can't/won't partially close an order! One broker offers a 'workaround' by closing the whole order and opening a new one, so how is your way of partial closing? Do you get a new ticket number - to me definite sign that the old order has been closed completely and a new order has been opened.

    1. OrderSend, that's how.
    2. How should I know how your broker determines commission. If it is fixed, two orders two commissions. If it is variable, that's equivalent to a spread. What's your problem?
    3. OrderClose
    4. How should I know your broker won't implement the OrderClose properly?
    5. A partial order close, has always resulted in a new ticket number.
    /
    To add comments, please log in or register