I successfully retrieve DDE data from ThinkOrSwim trading platform in excel using this cell formula:
=TOS|Last!AAPL
However, when I try to connect to ThinkOrSwim DDE using the NDDE library in a .Net C # application, I get the following error message, which is the same as I would understand that the ThinkOrSwim platform did not start at all:
The client could not connect to "TOS | LAST". Verify that the server application is running and that it supports the specified service name and a pair of names.
The exact same connection method with NDDE worked in 2009 and failed when I reused it in 2012. Perhaps ThinkOrSwim made some changes to their application to block it? I am wondering what to do next ... either find a way to get NDDE to work (better), or run an Excel spreadsheet in my .Net application (randomly).
Hope someone here knows that I can continue using NDDE and fix this connection problem.
Click to download the small code library I created to demonstrate this problem (Visual Studio 2010) . You will need to click File-> Download after loading the page.
Bounty is just the answers showing a solution using a clean .Net / windows api solution. Excel automation inside .Net is not taken for generosity.
Download ThinkOrSwim from: https://mediaserver.thinkorswim.com/installer/InstFiles/thinkorswim_jse6_installer.exe Contact me privately if you need to register.
source share