Calling TWS ActiveX from C#

Discussion in 'Trading Software' started by nitro, Oct 7, 2003.

  1. Nitro does the TWS API allow you to make a simple window call and load a stock symbol into TWS order entry or other windows from let's say your black box or any other application. I do not use TWS so I do not have experience with their API but am curious. We have had people as us to link our alerts to TWS so I am just trying to get some background information.

    Thanks
     
    #31     Oct 9, 2003
  2. nitro

    nitro

    SocalTrader,

    I am not sure what you are asking.

    You can control just about any aspect of TWS from the API. Most people use it to change the interface to their liking, or to automate trading completely, with the exception that any trade originated from the API MUST be routed SMART (this sucks, but what can I say?)

    From the API, you can just execute a trade without ever touching TWS.

    If this does not answer your question, please clarify.

    nitro
     
    #32     Oct 9, 2003
  3. Nitro you answered my question. That is what I had suspected but just wanted to get confirmation. We were asked by a bunch of our users to integrate to TWS because they would like to use our alerts as an alternative to RADAR that TWS offers. We link our software to many trading platforms out there so you can click on a symbol when you see it come across our alerts and load it into your level 2 window or order entry window in REDI Plus, Real Tick, Insta Quote, etc. Add TWS to this list http://www.trade-ideas.com/LinkDestination.html but it looks like they don't have that capability yet unfortunately.
     
    #33     Oct 9, 2003
  4. I ended up using sockets, and not pipes. I have both Java and C++ programs and using sockets allows me to run the applications on different systems (or the same with no changes in code). Pipes are local IPC only. Just a thought ...
     
    #34     Oct 9, 2003
  5. I thought pipes worked across a network? I haven't looked at the docs for a while so maybe I'm off?
     
    #35     Oct 9, 2003
  6. CalTrader

    CalTrader Guest

    Pipes work only on Windows ...... If you need to run on unix/linux or any other OS other than Microsoft you should use sockets.

    All of our systems use sockets for such applications. Designed properly, socket servers and client appliciations will run across all major Operating systems.
     
    #36     Oct 9, 2003
  7. Hey I have a question for you guys - I am a newbie at C# (and programming in general) and use VS. net, and would like to code some apps for creating custom indicators and stuff like that in the app, but I am paranoid of the app potentially getting out if someone were to hack it off my machine.

    What is the best way to ensure that even if the app gets stolen, it won't be able to run on another machine?

    Thanks in advance and sorry for the novice-level questions,
    -b
     
    #37     Oct 10, 2003
  8. Good question Bungrinder, this is no novice-level question at all. This is not related to C# but in fact a very general problem.

    I have myself been thinking about this without actually doing anything about it yet.

    In general, a good way to protect any kind of file is to use PGP = "Pretty Good Privacy". www.pgp.com. PGP-disk enables you to keep things secure with "military grade" protection.

    This is not a definite answer though as you have to think about the possibility of intruders getting at your "secret code" while it sits in memory. In fact all these problems are well known and are discussed in papers related to cryptographic systems like PGP. The same problem arises when manipulating keys and preventing intruders to profit from such transient states to get at truly critical stuff. I thought of doing something about this but I have not yet gotten around to it. I read a lot about it though and this is where I would look. One of the good texts covering many of these problems is "Applied Cryptography" by Bruce Schneier.

    nononsense
     
    #38     Oct 10, 2003
  9. I think this might be a case of premature optimization.. Unless youve got an arb model that someone's willing to kill for, just zipping up your source w/ pgp, and then using a .NET obfuscator (prevents dissasembly to human-readable source) should be more than sufficient..

    Just my $.02

    Regards,
    Laz
     
    #39     Oct 10, 2003
  10. Laz,

    I kind of agree with you that my PGP suggestion would suffice. As Bungrinder states that he is paranoid about this, he might in fact want to have a truly foolproof solution. If you truly have a money making algorithm, many snoops would be interested in it.

    What would be your answer to this? In fact the litterature of snooping goes rather far in this if you care to read up on what peope all do. Getting in fact information while transient in memory is not that far fetched. This is a commonly discussed problem in the cryptographic realm.

    nononsense
     
    #40     Oct 10, 2003