Gamestudio Links
Zorro Links
Newest Posts
Can't plot daily high & low
by Junker. 10/13/19 23:51
Imgui Lite-c Development
by txesmi. 10/13/19 09:40
A9
by Dooley. 10/11/19 18:53
Need Help Finding Cause of Crash
by Dooley. 10/11/19 18:51
What algorithm is used for BALANCED?
by JamesHH. 10/11/19 17:32
Votes for future features
by AndrewAMD. 10/11/19 14:12
Price not shown correctly via MT4 bridge
by gamadeus. 10/10/19 05:48
Loading Keybindings from a File
by Dooley. 10/10/19 03:44
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
5 registered members (Michael_Schwarz, YG8, kvm, JamesHH, 1 invisible), 637 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
FrankW, TedMar, raimucuk, vivaldi2, filip
18304 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
IB: GET_POSITION is sometimes invalid? #477962
08/19/19 18:41
08/19/19 18:41
Joined: Feb 2017
Posts: 768
Chicago
AndrewAMD Online OP
User
AndrewAMD  Online OP
User

Joined: Feb 2017
Posts: 768
Chicago
jcl,

With the IB plugin, GET_POSITION sometimes returns 0, even when a nonzero position exists! Apparently it returns 0 to indicate that there was a problem! So if it ever returns 0, I cannot rely on the output.

Perhaps the IB plugin can support a new command, GET_POSITIONISVALID? It indicates whether the previous GET_POSITION call output was an actual position or not. 0: not supported. 1: call was valid. 2: previous call resulted in an error.

This would be especially useful for pool management.

Thanks,
Andrew

Re: IB: GET_POSITION is sometimes invalid? [Re: AndrewAMD] #477963
08/20/19 08:14
08/20/19 08:14
Joined: Jul 2000
Posts: 27,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,024
Frankfurt
That command would probably not help much. If GET_POSITION wrongly returns 0, then GET_POSITIONISVALID could also wrongly return 1, due to the same error.

It is better to find out what error that was. For which assets does GET_POSITION return a wrong value and under which circumstances?

Re: IB: GET_POSITION is sometimes invalid? [Re: AndrewAMD] #477972
08/20/19 10:52
08/20/19 10:52
Joined: Feb 2017
Posts: 768
Chicago
AndrewAMD Online OP
User
AndrewAMD  Online OP
User

Joined: Feb 2017
Posts: 768
Chicago
Good question, I do not know if I can repeat the issue. There was one time where I was still connected, but every single GET_POSITION in my stock portfolio was returning 0 when there should have been positions. At least I think I was connected.

I will see if it comes up again.


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