How hard to write a DLL/ActiveX?

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

  1. maxpi

    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 http://www.powerbasic.com/

    Good luck,

    Osorico
     
    • pb.zip
      File size:
      10.3 KB
      Views:
      84
  3. maxpi

    maxpi

    Thanks.
     
  4. You would also need to acquire this

    http://www.traderssoft.com/ts/sdk/

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

    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",
    LPSTR, LPSTR, LPSTR, LPSTR, float, LPSTR, LPSTR, int;


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

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

    Max