IB Presetting Orders.

schoe

Well-known member
Messages
343
Likes
3
Before I go to work if I want to set an order to do the following is it possible and how do I do it in IB.

For example .

The YM is trading at 9970

If it reaches 10000 I want to buy

If it reaches 9950 I want to sell.

If either order is executed I want to preset targets to be activated and a stoploss. I also want the other order to be cancelled.

Can this be set up?

Thanks.
 
Yes Schoe it can be done:

First go to Page>>Layout and tick "OCA Group" in the right hand column.

Now for the buy order -

1. Click on the offer price of the instrument.

Change the order type to STP and enter the (above the) market price you wish to buy at. You could make it a STP LMT if you want to be sure of being filled in the range of your choice, i.e. 10 points or whatever. As stop limits are native I'd recommend them to avoid slippage.

Right click on the order line and Attach>>Bracket Orders. Enter the limit and stop price (for selling)

In the OCA group row that will be about fourth row from the left, and above two long numbers that correspind to the bracket orders, type in "mew" or whatever you wish to call your OCA group.

Now, follow the above procedure for the sell part of your trade, from step 1, except obviously you click initially on the bid price. Ensure that you type "mew" in the OCA group row for this trade as well. This will ensure that if one is triggered the other will cancel.

Only when the initial buy or sell order is triggered will the bracket orders will become live.

Don't forget to transmit then all at the end!

I'll do a screen shot in a mo so you know what it should look like...
 
Last edited:
Thanks Frugi very helpful (and quick) reply I love trade2win !

Is it also easy to attach the targets to scale out at and also cancel them if the opposite order is hit first?

I see you can also set a time element does this mean if I can set the order only to become live after say 1430 hours ie the Open of the cash market.
 
Screen shot...

You'll probably get bored of entering the orders manually one by one after a while, so you could Configure>>Hot Keys to make the job swifter.
 

Attachments

  • untitled.GIF
    untitled.GIF
    36.1 KB · Views: 382
No worries. I've never tried scaling out in the manner you suggest so I'm afraid I can't help you there.

Yes, as you've discovered you can set an order to become active after a certain time. Just tick the good after time box and enter the time, remembering that, for a day or two more at least, GMT is one hour behind BST, so to exit on a market order at 21:00 you'd enter 20:00 GMT. I think this changes when the clocks go back though.
 
LevII said:
You could try something like Ninja Trader

I have thought about using Ninja but having emailed them they say it would be too dangerous to use it for unattended trading in this manner as the orders would not be submitted if connection was lost with tws.
Hence I am going to have to learn how to set them myself.
 
Top