Taking partial profit on IB TWS

danjuma

Active member
Messages
110
Likes
0
Is there a way to put in an order with IB via TWS with partial profit (say half of position to be closed at a specified price)? I have searched and searched and can't find a solution. Bracket order would have done the job but does not allow the order size for the take profit to be changed (defaults to the full original order size). Thanks
 
Can't you just put in a limit order for half the position or whatever, at your target price?
 
Can't you just put in a limit order for half the position or whatever, at your target price?

Okay, thought of that and it might work, just was not sure of the impact on commissions, and might not work where the stock is not 'shortable'
 
But you're not shorting, you're just selling half of your position, or have I misunderstood? You buy 1000 shares at $10, when filled you then put in a sell order for 500 shares at $12 or whatever your first target is. There's no impact on commission as IB charges on a per share basis (for US equities). Selling 2x500 or 1x1000 makes no difference.
 
But you're not shorting, you're just selling half of your position, or have I misunderstood? You buy 1000 shares at $10, when filled you then put in a sell order for 500 shares at $12 or whatever your first target is. There's no impact on commission as IB charges on a per share basis (for US equities). Selling 2x500 or 1x1000 makes no difference.


Hello JoC. Thanks for your assistance much appreciated. Couple of things. I am not necessarily going to be in front of my PC when my initial order gets filled. So, I need both orders to be in place before I get filled. Other thing is that yes IB charges per share basis but with minimum commission of $1. So even if you buy 1 share, you pay a $1 in commission.
 
Hello JoC. Thanks for your assistance much appreciated. Couple of things. I am not necessarily going to be in front of my PC when my initial order gets filled. So, I need both orders to be in place before I get filled. Other thing is that yes IB charges per share basis but with minimum commission of $1. So even if you buy 1 share, you pay a $1 in commission.

Okay figured out a way round it. Use the bracket order, then once initial order is filled, modify the quantity in the take profit part of the bracket order. Only downside is you have to be around to do this once your original order is filled, else your whole order will be closed at the partial take profit target (price)
 
Is there a way to put in an order with IB via TWS with partial profit (say half of position to be closed at a specified price)? I have searched and searched and can't find a solution. Bracket order would have done the job but does not allow the order size for the take profit to be changed (defaults to the full original order size). Thanks

Do a market to limit order. Place a condition say if XYZ > $$$ in the condition tab and choose double bid/ask for the order reference. and in order table you set it up as a profit taker. Type in half of the shares you hold, click sweep to fill. Click the Market order. By using the double/bid ask, it makes sure that is naturally at that point and someone hasn't placed high sell order.

Additionally, addressing the time issue, you can set a time alert as well.
 
Hello JoC. Thanks for your assistance much appreciated. Couple of things. I am not necessarily going to be in front of my PC when my initial order gets filled. So, I need both orders to be in place before I get filled. Other thing is that yes IB charges per share basis but with minimum commission of $1. So even if you buy 1 share, you pay a $1 in commission.

That is incorrect. If you choose the tiered commission schedule, there is no minimum. You will pay about $0.67/200 shares.

Why would you buy only 1 share?
 
That is incorrect. If you choose the tiered commission schedule, there is no minimum. You will pay about $0.67/200 shares.

Why would you buy only 1 share?

hhiusa, I have not chosen nor am I at the stage to choose the tiered commission. I was not planning to buy 1 share; was just making a point. Anyway, thanks for your assistance/suggestion in your previous post. Much appreciated!
 
Do a market to limit order. Place a condition say if XYZ > $$$ in the condition tab and choose double bid/ask for the order reference. and in order table you set it up as a profit taker. Type in half of the shares you hold, click sweep to fill. Click the Market order. By using the double/bid ask, it makes sure that is naturally at that point and someone hasn't placed high sell order.

Additionally, addressing the time issue, you can set a time alert as well.

Hi hhiusa. I have just tried to follow suggestion above, unfortunately it is not very clear. I have the following questions:
1) What is a 'market to limit' order and where will I find this option?
2) Where is the order tab where I set up a 'profit taker' ?

Thanks
 
Hi hhiusa. I have just tried to follow suggestion above, unfortunately it is not very clear. I have the following questions:
1) What is a 'market to limit' order and where will I find this option?
2) Where is the order tab where I set up a 'profit taker' ?

Thanks

1) right click on the ask price. A buy order will appear below.
2) right click to the left "BUY", then select "modify", then selection "order ticket". Any column in the buy order that is empty will do.
3) Enter the number of share you want initially.
4) choose you order type right below where you enter the share amount.
4a) Order Type: MKT
4b) Time in Force: GTC
4c) Check the "Sweep to Fill" box
5) Click the "Conditional" tab
5a) Click "Add" to the right.
5b) Click "Price"
5b1) Underlying: (the ticker symbol you want to trade)
5b2) Method: Double Bid/Ask (is default however you could choose midpoint for stocks with big bid/ask spreads.
5b3) Price: The price at which you want the order to be transmitted. You can choose this option if you want it to buy automatically at a certain price.
5b4) Click Finish

If you want it to be at a certain time and price condition, then follow these steps.
5c) Click "Add" to the right.
5d) Click "Time"
5d1) Time: The time at which you want the alert to become active.
5d2) Click Finish

You can attach several conditions to the same trade. If I want to buy AAPL just before but only if it has reached a certain price. The condition will look like this:
double bid/ask price of AAPL STK on SMART is >130.00 and
time >= 20150526 15:55:00 EST.

As a side comment, the "SMART" means the order will be routed to the exchange based upon IB's algorithm for best execution. You can choose which exchange you want to send your order to. Many people choose ARCA because they have the lowest ask prices but the worst add liquidity rebates.

AMEX, ARCA, ARCAEDGE, B-TRADE, BYX, DARK, DIRECT EDGE, EGDEA, IEX, ISE, NASDAQ BX, NASDAQ/Island, NASDAQ PSX, NYSE, NYSERLP
Some of these require separate market data subscriptions.
NYSE
https://wit1.interactivebrokers.com/MktServices/servlet/CreatePdf?f=/en/accounts/fees/NYSEstkfee.php&lm=1409343630&domain=www.interactivebrokers.com&style=undefined
NASDAQ/Island
https://wit1.interactivebrokers.com/MktServices/servlet/CreatePdf?f=/en/accounts/fees/INETstkfee.php&lm=1422652452&domain=www.interactivebrokers.com&style=undefined
IEX
https://wit1.interactivebrokers.com/MktServices/servlet/CreatePdf?f=/en/accounts/fees/IEXstkfee.php&lm=1400776865&domain=www.interactivebrokers.com&style=undefined

You would then click Transmit.

For the sell order.
1) Right click to the left of the "BUY" order.
2) Click or highlight "Attach"
3) You can setup your sell order the same as you would do for a buy order.
 
Addendum to previous post

Select "Attach" then select "Limit" just below "Profit-Taker".

You can choose any price you want it to sell at after you buy the stock. Say I buy AAPL and I want it to sell automatically either after it increases by 1% or by the end of the day.

BUY AAPL STK on SMART price >= 130.00
SELL AAPL STK on SMART price >=131.30 or
time >= 20150526 15:55:00 EST
 
1) right click on the ask price. A buy order will appear below.
2) right click to the left "BUY", then select "modify", then selection "order ticket". Any column in the buy order that is empty will do.
3) Enter the number of share you want initially.
4) choose you order type right below where you enter the share amount.
4a) Order Type: MKT
4b) Time in Force: GTC
4c) Check the "Sweep to Fill" box
5) Click the "Conditional" tab
5a) Click "Add" to the right.
5b) Click "Price"
5b1) Underlying: (the ticker symbol you want to trade)
5b2) Method: Double Bid/Ask (is default however you could choose midpoint for stocks with big bid/ask spreads.
5b3) Price: The price at which you want the order to be transmitted. You can choose this option if you want it to buy automatically at a certain price.
5b4) Click Finish

If you want it to be at a certain time and price condition, then follow these steps.
5c) Click "Add" to the right.
5d) Click "Time"
5d1) Time: The time at which you want the alert to become active.
5d2) Click Finish

You can attach several conditions to the same trade. If I want to buy AAPL just before but only if it has reached a certain price. The condition will look like this:
double bid/ask price of AAPL STK on SMART is >130.00 and
time >= 20150526 15:55:00 EST.

As a side comment, the "SMART" means the order will be routed to the exchange based upon IB's algorithm for best execution. You can choose which exchange you want to send your order to. Many people choose ARCA because they have the lowest ask prices but the worst add liquidity rebates.

AMEX, ARCA, ARCAEDGE, B-TRADE, BYX, DARK, DIRECT EDGE, EGDEA, IEX, ISE, NASDAQ BX, NASDAQ/Island, NASDAQ PSX, NYSE, NYSERLP
Some of these require separate market data subscriptions.
NYSE
https://wit1.interactivebrokers.com/MktServices/servlet/CreatePdf?f=/en/accounts/fees/NYSEstkfee.php&lm=1409343630&domain=www.interactivebrokers.com&style=undefined
NASDAQ/Island
https://wit1.interactivebrokers.com/MktServices/servlet/CreatePdf?f=/en/accounts/fees/INETstkfee.php&lm=1422652452&domain=www.interactivebrokers.com&style=undefined
IEX
https://wit1.interactivebrokers.com/MktServices/servlet/CreatePdf?f=/en/accounts/fees/IEXstkfee.php&lm=1400776865&domain=www.interactivebrokers.com&style=undefined

You would then click Transmit.

For the sell order.
1) Right click to the left of the "BUY" order.
2) Click or highlight "Attach"
3) You can setup your sell order the same as you would do for a buy order.

Hi hhiusa, thank you very much for taking the time to assist me with this clear step-by-step guide, I am most grateful. However, it doesn't look like this actually is a solution to what I am after. Copy of my original post below:

"Is there a way to put in an order with IB via TWS with partial profit (say half of position to be closed at a specified price)? I have searched and searched and can't find a solution. Bracket order would have done the job but does not allow the order size for the take profit to be changed (defaults to the full original order size). Thanks"

Let me use an example to clarify:
I place a buy limit for 100 shares of stock XYZ
I attach a stop loss
However, I want say 50 shares of stock XYZ to be sold at a specified price when price has moved in my favour (ie. take partial profit), with the remaining 50 shares left to run or until stopped out.

Hope I have made myself clearer. Thanks
 
Hi hhiusa, thank you very much for taking the time to assist me with this clear step-by-step guide, I am most grateful. However, it doesn't look like this actually is a solution to what I am after. Copy of my original post below:

"Is there a way to put in an order with IB via TWS with partial profit (say half of position to be closed at a specified price)? I have searched and searched and can't find a solution. Bracket order would have done the job but does not allow the order size for the take profit to be changed (defaults to the full original order size). Thanks"

Let me use an example to clarify:
I place a buy limit for 100 shares of stock XYZ
I attach a stop loss
However, I want say 50 shares of stock XYZ to be sold at a specified price when price has moved in my favour (ie. take partial profit), with the remaining 50 shares left to run or until stopped out.

Hope I have made myself clearer. Thanks

Seriously, you are overcomplicating it. Just enter half of the shares you want to sell when you attach the sell order to the buy order.

Setup up the buy order just as instructed for say 100 shares XYZ attach a sell order just as instructed but enter 50 shares in "Amount" section. Now half of the order will be sold at a certain price improvement.

What do you think stopped out means as the remainder will not be sold until you specify a second condition. Why not sell it all at the higher price? When you say "stopped out", do you mean a "stop limit" order?
 
Seriously, you are overcomplicating it. Just enter half of the shares you want to sell when you attach the sell order to the buy order.

Setup up the buy order just as instructed for say 100 shares XYZ attach a sell order just as instructed but enter 50 shares in "Amount" section. Now half of the order will be sold at a certain price improvement.

What do you think stopped out means as the remainder will not be sold until you specify a second condition. Why not sell it all at the higher price? When you say "stopped out", do you mean a "stop limit" order?

Hi hhiusa, thanks for the reply. Okay, may be either I have not made myself clear enough or I am missing something. Anyway, like I mentioned a few posts back, I have found a round about way of accomplishing what I am after by using bracket order. Only downside is that I can not amend the number of shares for the part profit part until the original has been triggered.
When I say 'stopped-out', I mean my stop-loss is hit and the trade becomes a loser. Thanks
 
Hi hhiusa, thanks for the reply. Okay, may be either I have not made myself clear enough or I am missing something.....
When I say 'stopped-out', I mean my stop-loss is hit and the trade becomes a loser. Thanks

Why not just do as I listed which is very rudimentary. Pre-progam the order to close all the shares at a certain prices say 1% above the purchase price. You can simultaneously attach a stop limit order as I said to make sure the trade doesn't not lose to much money.

Follow everything as I have listed for the buy order.

Right click to the left of the "flashing blue BUY symbol" it will show you a menu like this
Screen_Shot_2015_05_26_at_4_33_16_PM.png

Highlight "modify" then click "Order Ticket"
It will show you a menu like this
Screen_Shot_2015_05_27_at_1_20_06_PM.png

Make sure "Action" is set to "Sell"
Amount: Goes without saying
Order Type: MKT
Destination: SMART (Based upon your level of sophistication I guessing you may not have adequate access to market data, so I would set your destination there. You may also choose which exchange you want as I have previously mentioned.)
Check "Sweep to fill"
Time in Force: GTC

Click the "Conditional" tab
Screen_Shot_2015_05_27_at_1_22_13_PM.png

Click "Add"
Click "Price"
Screen_Shot_2015_05_27_at_1_21_38_PM.png

Click "Finish" (that goes without saying)
Click "and" just the "Logic" column
Click "or"
Click "Add"
Click "Price"
Underlying: AAPL
Method: Double Bid/Ask
Operator: <=
Price: Enter your stop market price.
Click "Finish"
Screen_Shot_2015_05_27_at_1_30_28_PM.png

Click "Transmit"

Now if it goes too low, it will sell automatically. If it goes above a certain price, it will sell automatically as well.

Phhewww:sleep::sleep::sleep:
 
Why not just do as I listed which is very rudimentary. Pre-progam the order to close all the shares at a certain prices say 1% above the purchase price. You can simultaneously attach a stop limit order as I said to make sure the trade doesn't not lose to much money.

Follow everything as I have listed for the buy order.

Right click to the left of the "flashing blue BUY symbol" it will show you a menu like this
Screen_Shot_2015_05_26_at_4_33_16_PM.png

Highlight "modify" then click "Order Ticket"
It will show you a menu like this
Screen_Shot_2015_05_27_at_1_20_06_PM.png

Make sure "Action" is set to "Sell"
Amount: Goes without saying
Order Type: MKT
Destination: SMART (Based upon your level of sophistication I guessing you may not have adequate access to market data, so I would set your destination there. You may also choose which exchange you want as I have previously mentioned.)
Check "Sweep to fill"
Time in Force: GTC

Click the "Conditional" tab
Screen_Shot_2015_05_27_at_1_22_13_PM.png

Click "Add"
Click "Price"
Screen_Shot_2015_05_27_at_1_21_38_PM.png

Click "Finish" (that goes without saying)
Click "and" just the "Logic" column
Click "or"
Click "Add"
Click "Price"
Underlying: AAPL
Method: Double Bid/Ask
Operator: <=
Price: Enter your stop market price.
Click "Finish"
Screen_Shot_2015_05_27_at_1_30_28_PM.png

Click "Transmit"

Now if it goes too low, it will sell automatically. If it goes above a certain price, it will sell automatically as well.

Phhewww:sleep::sleep::sleep:

Hi hhiusa, many thanks fro your reply and assistance. I will try out as you suggested above tomorrow and feed back. Most obliged.(y)
 
I hope you got it to work.

Hi hhiusa. Sorry for not getting back to you sooner. I have tried it and it did not work as such.

Following from the step below as per your guide, when I got to the "Quantity" box, it was greyed out and thus was unable to amend the quantity. Anyway. thank you so much for all your time and assistance for trying to find a solution to my issue. I think I will just stick to using bracket order (and them amending the partial profit quantity when the order is triggered) for now. Many thanks

Follow everything as I have listed for the buy order.
Right click to the left of the "flashing blue BUY symbol" it will show you a menu like this
Highlight "modify" then click "Order Ticket"
It will show you a menu like this
Make sure "Action" is set to "Sell"
Amount: Goes without saying
Order Type: MKT
...
 
Hi hhiusa. Sorry for not getting back to you sooner. I have tried it and it did not work as such.

Following from the step below as per your guide, when I got to the "Quantity" box, it was greyed out and thus was unable to amend the quantity. Anyway. thank you so much for all your time and assistance for trying to find a solution to my issue. I think I will just stick to using bracket order (and them amending the partial profit quantity when the order is triggered) for now. Many thanks

I am totally curious now. Why don't you take screenshots for me?
 
Top