¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

(re-post) Anyone have simple combo orders (e.g., futures spreads) working in C++?


 

Sorry to repost.


I've been using the API for 3 years now, in C++ VS2010 builds. I can't get futures spreads to work for trading. I can properly form the contract and receive accurate historical data and also real-time market data. But when I go to trade I receive the message "Missing or invalid NonGuaranteed value. REL+MKT, LMT+MKT ..." despite my order being a MKT order. My code is copied verbatim from an API header file ?The code builds perfectly. The historical data queried via reqHistoricalData is accurate and the market data queried by reqMktData is as well (mkt data shows the tighter "inside" market not the wider legs one). ?IB wasn't helpful- they merely explained what "NonGuaranteed" referred to and sent me some C# code. My issue is somehow specific to C++. I'm happy to pay someone for an offline skype chat about this if we can get it working. Simple futures spreads are all I need. Thanks in advance.


 

Well, I¡¯ve never done much with combos, but looking at your previous post I see the code:



TagValueSPtr tagValue( new TagValue());

tagValue->tag = "NonGuaranteed";

tagValue->value = "1";

And your error message says ¡°Missing or invalid NonGuaranteed value¡±. So might it possibly be that setting NonGuaranteed to 1 is invalid in this context? (Excuse me if I¡¯m being obtuse here and it¡¯s ¡®obviously¡¯ nothing to do with that, but as I say I¡¯ve little knowledge of this area.)





From: TWSAPI@... [mailto:TWSAPI@...]
Sent: 25 November 2015 05:38
To: TWSAPI@...
Subject: [TWS API] (re-post) Anyone have simple combo orders (e.g., futures spreads) working in C++?





Sorry to repost.



I've been using the API for 3 years now, in C++ VS2010 builds. I can't get futures spreads to work for trading. I can properly form the contract and receive accurate historical data and also real-time market data. But when I go to trade I receive the message "Missing or invalid NonGuaranteed value. REL+MKT, LMT+MKT ..." despite my order being a MKT order. My code is copied verbatim from an API header file The code builds perfectly. The historical data queried via reqHistoricalData is accurate and the market data queried by reqMktData is as well (mkt data shows the tighter "inside" market not the wider legs one). IB wasn't helpful- they merely explained what "NonGuaranteed" referred to and sent me some C# code. My issue is somehow specific to C++. I'm happy to pay someone for an offline skype chat about this if we can get it working. Simple futures spreads are all I need. Thanks in advance.





[Non-text portions of this message have been removed]


 

Wow. Thank you. Setting to "0" worked.?

Something is "wrong" with their C++ implementation, as every other language and all of the examples say to set it to "1."?

Richard, I am indebted to you. Thanks.