How hard to write a DLL/ActiveX?

Discussion in 'Trading Software' started by maxpi, Jun 20, 2006.

  1. maxpi


    I have used a couple of softwares to connect tradestation to TWS. One had a few bugs, the author sold a few hundred copies, cracked versions became available and he stopped supporting it. The other one is free but it seems to break with TWS upgrades, not certain about that really but I found a thread where several people were having troubles with it. This is the weakest link in my technical trading stuff.

    I have been told that Power Basic is a very good way to produce DLL's and ActiveX stuff. My question is: how hard will it be for somebody that can do Easy Language and VBA and is familiar with Basic to write an interface between TS and TWS??
  2. PowerBasic is great for creating DLLs. But PB cannot create ActiveX (COM) containers. It can however act as an ActiveX (COM) client. If TS and TWS are COM servers, you can use PB to control.

    Given your level of programming, I don't think this will be a trivial task for you, using PB or any other language. I've attached some PB sample files... One each for COM, DLL, and a basic GUI. If you understand them give it a go. But as said, I don't think it will be trivial.

    Be sure to visit

    Good luck,

      File size:
      10.3 KB
  3. maxpi


  4. You would also need to acquire this

    or something similar as Omega never released the specs to write into the Globalserver database.
  5. maxpi


    I don't need to access globalserver probably. I need to call functions from EZlanguage. The packages I have do that, I have to insert definitions into the EZlanguage and the function calls. I did not think the code was using any tradestation API functions, hopefully not because they were not known for sharing info.

    Here is an example, I have to enable the tws API for activex and socket clients to use it. Not that I know exactly what that is at this point. The definition says DefineDLLFunc, not sure if that means it has to be a dll or it could be ActiveX.

    DefineDLLFunc: "hocts.dll", LPSTR, "S_BUYMARKET",

    and the function call to buy 100 shares of intel, smart routed:

    OrderID = S_BUYMARKET(INTC, "stk"
    , "", "", 0, "smart", "", 100);