PATS API Automated Trading

Discussion in 'Automated Trading' started by MikeDip, Nov 9, 2001.

  1. MikeDip


    Is anybody successfully using the PATS API for automated trading of eminis? If so, could you please tell me which development system and which operating system you are using.

    I have been trying for several months to get the API working on a Win'98 machine using GNU 'C'. Borland C++ and Microsoft VB but all applications run into the same problem - when the app is closed the patsapi.dll does not free from memory causing any future running of the app to fail. Only a reboot frees the dll. This is obviously very frustrating during the development phase.

    PATS support tell me this does not happen on Win2K or WinNT machines but has anyone written a working app on one of these O/S's?
  2. MikeDip


    I have received a reply from another member with the fix for this problem. The PATS API function ptLogOff() must be called before closing the app even if the ptLogOn() function had not been called. This functions closes all the api's threads, some of which are not closed by just unloading the dll.
  3. Quiet1


    I have a follow-up question for any PATS API programmers.

    Has anyone coded up a COM (VB compliant) wrapper for the API? My preference is to code in VB/Excel VBA and writing the COM wrapper myself in Delphi to enable me to do this looks like a pain in the ....
  4. MikeDip


    Now that I have the lock up problem fixed I will complete coding a dll wrapper for the API so it will interface to my trading systems that are all written in VB. I will let you know when it is complete.
  5. They have it at using Tradestation. Its called the AutoXecutor. Use the J-Trader platform by Patsystems.
  6. dkamp

    dkamp Guest

    The AutoXecutor only works with older versions of TS, not the latest TS Pro. They're looking for alternatives to TS.
  7. If anyone if versatile in using the Metastock Developer's Kit, I would be interested in paying for a link up to Patsystems J-Trader to allow for automated orders via Metastock Expert alerts.
  8. I have experience with the kit. The developers kit isn't really that useful for what you want to do. It cannot access indicators, systems, experts or anything else "inside" metastock. The developers kit provides two different types of functionality (plus a few other things):

    1. programmatic access to metastock files. Think of this as the software API corresponding to the downloader

    2. ability to write custom indicators in C++/C/VB that can be called from Metastock indicators, experts and systems.

    Obviously, what you want to do can be done as an indicator attached to a chart via an expert. The indicator would then have to issue the trading commands.

    Hope this helps.