Troubleshooting and Fixing Robot Problems

Occasionally you might see order problems when sending orders to TWS.  You could see the following situations:

  • Orders get sent to TWS, but stay in the Queued state and are not automatically transmitted
  • The robot gets completely disconnected from TWS when sending orders
  • Other general strange behavior

How to Troubleshoot Problems with the Robot

The robot logs everything that it does to text files on your local hard drive.  You can use these files to troubleshoot any issue you have with the robot.  To access these files, bring up the robot and go to the Automated Strategies tab where you will see a link that reads Open Log Folder:

Open Log Folder

Click on this link and it will bring up the folder which contains the log files.  You will see several log files in this folder for each day that you have run the robot.

Robot Log Files

Here is a description of each of the log files.  Note that yyyymmdd will be the date that you ran the robot, for example 20100101 would be January 1, 2010.

  • messages.yyyymmdd.txt - Main log file containing all actions taken by the robot.
  • errors.yyyymmdd.txt - Errors that are received from TWS are logged to this file.  Use this file to troubleshoot connectivity issues or order issues.
  • quotes.yyyymmdd.txt - All quotes received from TWS are logged to this file.  Use this to troubleshoot quote timeout issues.
  • signals.yyyymmdd.txt - All signals received from your Trade-ideas strategies are logged here.
  • executions.yyyymmdd.txt - All executions reported from TWS are logged to this file.

When troubleshooting issues, open the errors file first - often times this file will contain your answer.  For example, if you ran out of buying power you would see order rejections in this file along with a message explaining that you ran out of buying power.

If there are no obvious messages in the errors file, look at the messages file.  All files log a timestamp at the time the log entry was written, so search the log file for the time your error occurred.

TWS Log File

In some cases you'll need to examine the TWS log file.  This is a file that is normally located in c:\jts on your hard drive.  The files look like: log.Mon.txt, log.Tue.txt where Mon and Tue are the day of the week.  These are overwritten the next week.  Note that these files are large and somewhat difficult to read.

TWS Audit Trail

A more friendly way to access portions of the TWS log file is to view an "Audit Trail" that TWS creates.  From within Trader Workstation, go to View... Audit Trail.  This will generate a report that is more easily read than the raw log file.

Getting More Help

In the event that you can not determine what the problem is, you can get help from StockTickr Support.  Send an email to support at stocktickr dot com with the following log files attached:

  • messages.yyyymmdd.txt
  • errors.yyyymmdd.txt
  • quotes.yyyymmdd.txt
  • c:\jts\log.DOW.txt (where DOW is the day of the week)
  • config.ini from the log folder

Note that you may need to zip these files up if they are too large to send via email.  You can also use the Contact Us link to get help.