Re: Long on the stock, want to exit but: Order rejected The contract is not available for short sale
A,? If it's in your paper account, welcome to IB..
If it's production, check that the contractID is the same, and the exchange is right (SMART, or whatever came on the Position record itself). If IB
By
Peter Drier
·
#47168
·
|
Re: Long on the stock, want to exit but: Order rejected The contract is not available for short sale
No, it tried to sell half the position.
A
By
Ace
·
#47167
·
|
Re: Long on the stock, want to exit but: Order rejected The contract is not available for short sale
Is your algorithm trying to sell more shares than what the position holds? Maybe the fill quantity was slightly smaller than what the algorithm had ordered?
JR
By
Jürgen Reinold
·
#47166
·
|
Long on the stock, want to exit but: Order rejected The contract is not available for short sale
Hi,
My algo took a long position on a stock and when target was reached and wanted to exit I got this message:
201 Order rejected - reason:The contract is not available for short sale.
I'm aware
By
Ace
·
#47165
·
|
Re: Custom Scanners?
Patrick,
Re: "we cannot pull our already made scanners in TWS into Python?"
No, we can not, but we can look inside the already made scanner to get all
the associated attributes names etc.
Click on
By
Dmitry Shevkoplyas
·
#47164
·
|
Re: Reporting Script Code, I think its awesome, you might like it too!
Here's a photo of sample output. Just saw the Mark To Market is wrong, should say $2,680 with $378 in Commissions. It's a pretty neat output. You're going to have to go into the code and change that
By
Patrick C
·
#47163
·
|
code/script in API to close/shutdown TWS
Hi Josh/Group,
Please pardon if ever disclosed. Does anyone know if there exists corresponding code/script in API to close/shutdown TWS from within java, i.e. from within an IDE?? Reboot/refresh
By
robertvanquish@...
·
#47162
·
|
Re: CANNOT COMPILE C++ CODE WITH VISUAL STUDIO 2017
The project come with default SDK /Plateform settings (generally Win 8.1)
This is your responsibility as the owner or teh compiler to setup/reset the proper setting according to your Microsoft SDK
By
Gordon Eldest
·
#47161
·
|
Re: Do I need to create a GUI for using the IBAPI sample program TestCppClient. Thanks.
Yes!
In case you want to dig UI like, run the C# version (if you have VS STudio), it have some UI that may give a seed for something assuming you know or will master a little of C#
But I suspect that
By
Gordon Eldest
·
#47160
·
|
Re: Custom Scanners?
Look what you look for.
As stated below also if you make a call to reqScannerParameters()
You will get back an XML with some specifics related to each classe of instruments
But I suspect that you do
By
Gordon Eldest
·
#47159
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
Yeah, AFAIK it's not possible to set different sizes in a simple bracket order so it's pretty perplexing that IB support would suggest that. It is possible with the pair-trade variety of the bracket
By
ds-avatar
·
#47158
·
|
Re: Model Portfolios functionality in TWS API
Is this possible using the TWS API?
By
wallstreetbets
·
#47157
·
|
Re: Custom Scanners?
In addition here are the some specific filters:
ScannerSubscription scannerSubsctiption = new
By
Obiwan23
·
#47156
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
Forgot to attached a couple screen grabs.
First the five orders. Please note that 23.1 was placed with a quantity of 500.via the API.
Attempt to change quantity of 23.1 via API fails without error
By
Jürgen Reinold
·
#47155
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
I actually tried that (and slight variations) when I saw your original post last night, but it did not work for me.
What happens is that IB automatically sets the quantity for #3 to the same full
By
Jürgen Reinold
·
#47154
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
Ruh roh, the forum may have gotten pwned by IP support.
By
Nick <news1000@...>
·
#47153
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
Unfortunately I did not have the luxury (time) to try this out myself, so a BIG thank you to Richard.
However, I managed to call IB API support and was suggested the following:
Create 5 (!!!)
By
Levente
·
#47152
·
|
Re: Custom Scanners?
Here is a list of available scancodes. I don't know if there are more.
TOP_PERC_GAIN , TOP_PERC_LOSE , MOST_ACTIVE , ALL_SYMBOLS_ASC , ALL_SYMBOLS_DESC , BOND_CUSIP_AZ , BOND_CUSIP_ZA ,
By
Despair
·
#47151
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
I recommend that you create two sets of orders with size N/2. Each set includes a parent order and the bracket order (stop loss and target limit).
--
https://www.tradingsoftwarelab.com
By
Orionn
·
#47150
·
|
Re: Can a bracket order have two take profit orders to exit a position at two different profit levels?
I don't know the commission impact or if it fits with your strategy but perhaps you could place two brackets each for N/2 shares. This would leave you always protected and you wouldn't have to deal
By
Nick <news1000@...>
·
#47149
·
|