Gamestudio Links
Zorro Links
Newest Posts
How to install R ?
by Clifford_B. 10/16/19 18:05
Indices & metals easier to trade than FX???
by StefanCGN. 10/15/19 16:19
Can't plot daily high & low
by Zheka. 10/14/19 18:39
TWS "Market closed" fix
by jcl. 10/14/19 15:09
2xCapital slider to increase size
by jcl. 10/14/19 14:03
Imgui Lite-c Development
by txesmi. 10/13/19 09:40
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
10 registered members (Phrendo, AndrewAMD, Clifford_B, 3run, Dooley, sdh309795gaas, Superku, Shutch, kvm, 1 invisible), 625 guests, and 31 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Clifford_B, Paulius, Junker, FrankW, TedMar
18307 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Message from IB of open position #477416
06/24/19 15:22
06/24/19 15:22
Joined: Aug 2018
Posts: 87
O
OptimusPrime Offline OP
Junior Member
OptimusPrime  Offline OP
Junior Member
O

Joined: Aug 2018
Posts: 87
>> Is there a message or field from IB that I can check in my Zorro script to determine if IB has open positions in the currency pair I am trading? I am currently demo-ing my script.

I sometimes have positions that are open in IB while Zorro has closed out all positions.

I will retrace my steps to debug my script but in the meantime, I want an automated way to detect when this has happened without manually checking the IB Gateway position window.


Thanks so much,

OptimusPrime

Re: Message from IB of open position [Re: OptimusPrime] #477418
06/24/19 15:41
06/24/19 15:41
Joined: Jul 2000
Posts: 27,029
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,029
Frankfurt
Not for currency pairs. IB supports positions only for stocks, futures, or options.

Re: Message from IB of open position [Re: OptimusPrime] #477428
06/25/19 13:58
06/25/19 13:58
Joined: Jul 2017
Posts: 407
Z
Zheka Offline
Senior Member
Zheka  Offline
Senior Member
Z

Joined: Jul 2017
Posts: 407
There is a setting in TWS/IBG->Config->API -> Include Virtual FX positions when sending a portfolio".

https://www.interactivebrokers.com/...g/fx_portfolio_-_virtual_fx_position.htm

When checked, positions returned by reqPositions and similar requests will include Virtual FX positions, i.e. "positions opened in currency pairs" rather than just net cash currency balances.
So, this info is available via API.

Re: Message from IB of open position [Re: OptimusPrime] #477435
06/26/19 12:59
06/26/19 12:59
Joined: Jul 2000
Posts: 27,029
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,029
Frankfurt
Thanks for the info!


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1