开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date

Re: Help Needed with my Excel SHeet (DDE)

 

开云体育

Thank you very much


On 20 Feb 2020, at 22:03, Josh via Groups.Io <jb201448@...> wrote:

Thats an issue with the higher builds of TWS and the legacy DDE interface; theres a thread on it a couple days back.?
Try TWS v972:?


Re: Help Needed with my Excel SHeet (DDE)

 

Thats an issue with the higher builds of TWS and the legacy DDE interface; theres a thread on it a couple days back.?
Try TWS v972:?


Re: Help Needed with my Excel SHeet (DDE)

 

Hi Josh

Error Code: 320
Message:? Error reading request:-'ord' : cause - Invalid scale order.? You should specify component order size.

I get this message when i use the twsdde sample sheet provided.



On Thu, Feb 20, 2020 at 10:24 PM Josh via Groups.Io <jb201448=[email protected]> wrote:
What error do you receive after placing the order??
?
These formulas will show information about the last encountered error (with 'twsserver' replaced by your username if you're using the legacy DDE connection).?
?
=Stwsserver|err!id
=Stwsserver|err!errorCode
=Stwsserver|err!errorMsg
?


Re: Market data lines

 

Yes if you press Ctrl-Alt-= simultaneously on your keyboard.?


Re: Help Needed with my Excel SHeet (DDE)

 

What error do you receive after placing the order??
?
These formulas will show information about the last encountered error (with 'twsserver' replaced by your username if you're using the legacy DDE connection).?
?
=Stwsserver|err!id
=Stwsserver|err!errorCode
=Stwsserver|err!errorMsg
?


Re: Help Needed with my Excel SHeet (DDE)

 

开云体育

Perhaps because my balance is below usd2000. ?Seems strange that I can get live data from paper trader using api but can’t transmit an order.

Thanks


On 20 Feb 2020, at 19:44, Yair Altman via Groups.Io <altmany@...> wrote:

Perhaps you're on IB's "LiTE" plan, which does not allow placing trades via the API (unlike the "Pro" plan). See?


Re: Help Needed with my Excel SHeet (DDE)

 

Perhaps you're on IB's "LiTE" plan, which does not allow placing trades via the API (unlike the "Pro" plan). See?


Re: Help Needed with my Excel SHeet (DDE)

 

Hi Yair,

No, I have enable dde clients ticked and? Read Only unticked.? Is there any chance you could try my spreadsheet on your paper trading account and see if the orders actually place?

Cheers

On Thu, Feb 20, 2020 at 8:49 PM Yair Altman via Groups.Io <altmany=[email protected]> wrote:
In your TWS/Gateway's API configuration, you need to ensure that the "Enable DDE clients" checkbox is on and the "Read-Only API" checkbox is off. I suspect that it is set-up differently on your TWS.?


Re: Help Needed with my Excel SHeet (DDE)

 

In your TWS/Gateway's API configuration, you need to ensure that the "Enable DDE clients" checkbox is on and the "Read-Only API" checkbox is off. I suspect that it is set-up differently on your TWS.?


Help Needed with my Excel SHeet (DDE)

 

Hi

I successfully got this spreadsheet working and trading hands free about 1 year ago.? It is a simple program that looks at the last 18 seconds of tick data and then if there is a movement up, it places a sell bracket order with a? stop and a take profit.? Similarly, if there is a move down it places a buy bracket order.? I only used it in paper trading account, but the purpose was to see what i could get done after mastering how to program a bracket order

?

It worked perfectly 1 year ago.? Now it connects to to market data, but the orders do not fire.? I cannot seem to place a simple buy or sell order or a bracket order that connects and fires through the API.

I have downoaded the stable version of TWS for windows 32 Bit
I have downloaded the API software.

Even when i use the sample dde sheet from from IB, i can get market data, but i cannot fire a simple order.

Please if someone has the time, could they open their paper trading account and try out my spreadsheet.

First thing to do is change name to your paper trading account name in my spreadsheet
Then, hit Reset All And Create Futures Ticker button

Then start timer and wait for 18 seconds for 18 seconds of data to accumulate

THen Hit Handbrake off button.

I just want to see if it actually places orders.

My account is only funded to about USD1000 at the moment, could this be a reason?

If not what am i doing wrong

Cheers
Brian





Any way to know what subscriptions are active

 

reqmktdata, reqpnl etc.?
is there a way to know what all I have subscribed to via API calls??

one way is to put the logic in my API but would be nice if data exists on server somewhere.


Re: Question on data being purge on exit of API application

 

Happy to say solved this last night, it was a thread blocking issue.


Market data lines

 

Is it somehow possible to see in the TWS how many market data lines one has subscribed to?


Re: Release Notes new TWS API version 979 ?

 

The Release Notes are always linked from the download page?
I think the most recent (v979) are still being written up. Its not necessary to upgrade the API though, unless theres a specific feature you're interested in using. Was there a particular feature you had a question about, or were you just curious about whats new??


Re: Total Quantity on a Completed Order

 

The reqCompletedOrders function is for both cancelled and filled orders (and partially filled) that are no longer active. totalQuantity is for the size of the part of the order which didn't fill, whereas filledQuantity would be for the size of the filled part. So if the order filled completely you'd have totalQuantity=0 and filledQuantity=filled size.?


Re: update order type SNAP PRIM

 

the thing thats confusing to me is that I dont actually want to change anything, just reset the limit at which IB places the trade. However the Order does not tell us the current limit price, since its of type SNAP PRIM.?


Re: Question on data being purge on exit of API application

 

Thanks for the reply, even the error callback in EWrapper gets blocked. I am leaning towards option 3 of yours, but I want to know how the API was able to block everything from EWrapper .......


On Wed, Feb 19, 2020 at 10:30 AM, Nick wrote:
t the idea. Since data arrives during sh


Re: Question on data being purge on exit of API application

Nick
 

开云体育

Although IB does occasionally break TWS or the api libraries this kind of situation is almost always an issue in the client app.

Since you have multiple threads with an intermittent failure a race condition is a likely suspect.

I don't use the C# libraries so I don't have specific help on what to look for inside the library.

Given that the TWS log shows the data is sent then:
1) The tws library has stopped reading the socket
2) The tws library has stopped making callbacks
3) A callback never returns and prevents future callbacks from being called

There may be other possibilities but you get the idea. Since data arrives during shutdown you might look for any threads that get released during shutdown (but were previously stalled).


On 2/19/2020 10:04 AM, ashwani.malhotra@... wrote:

Hello,

This is my first post here, I am using C# to write my code, recently on random, I stop getting data printed and processed on my console application. I request tickdata and subscribe to pnl and pnlsingle. On random I will stop getting any printouts on my screen but I have full control of my API, I can check my status / see the status of my threads etc. It appears the code is waiting for data but not getting anything.?
When I quit the program I get all the missing data dumped on me and my API processes it like normal, has anyone seen an issue like this before?
When I check the TWS log files via diagnostic tool all the data seems to be normal, no discrepancy in data being delivered. It looks like something a process or thread or a message process is stuck and purges everything back to me when I start disconnecting?

Any inputs or insights are appeciated.

Thanks,
AM


Re: update order type SNAP PRIM

Nick
 

开云体育

You can modify an order by calling placeOrder with the same order id. Fill in all the fields the same as the original order except the ones you want to change.

Some changes are allowed and some aren't. You'll probably have to experiment to see if you can change the price for this order type.


On 2/19/2020 8:30 AM, nkulki@... wrote:

There is a an order type called SNAP PRIM which will place a order to the best bid or best ask. I would like to periodically update this order since this does not follow the order book. Is there any easy way to update the order so that it will update the effective limit price of the order? Currently I tend to cancel and place new orders. But I was wondering if there was a way to update the existing order rather than cancelling an existing order and then place? a new order.


Re: Total Quantity on a Completed Order

Nick
 

开云体育

This seems like one of the newer api functions so there might not be too many people using it yet.

I think your best bet is to contact IB Api support if you haven't seen a reply by now.


On 2/18/2020 4:17 PM, Mikhail Veygman wrote:

When I attempt to recover completed orders with API 9.76 I seems to get totalQuantity() == 0 in the completed Order.

To reproduce the behavior on my end I send a Market Order (MSFT).?
Get it filled.?
Drop the client.?
Reconnect the client.??

client.reqCompletedOrders()

The callback 'completedOrder' will get called with totalQuantity of 0.

Code I have is in Java which I can post if need be.

But should I be seeing this behavior?

--
Regards,

Mikhail Veygman