Unicorn Trading
Preventing TradeStation 2000i crashes| Home | ProSizer | EasyLanguage | Quotes |
Anyone who has used TradeStation 2000i long enough, has undoubtedly noticed a certain instability about it, resulting in failure to display strategy performance reports, inexplicable crashes, or freezing up if the program is left running too long. These problems may be caused by memory management bugs and memory "leaks." This isn't necessarily the fault of TradeStation, but more the memory management routines it uses.
The fix has a two-pronged approach.
(All of this should be applicable to all versions of TradeStation.)
1. Patch the memory management DLL.
An acquaintance happened to notice that the SHW32.DLL file installed by TradeStation is much older than another one he had from some other software. After going through several layers of tech support at TradeStation, they confirmed that TS2000i uses this DLL for memory management. As an experiment, he replaced the old one with the new one (backing up the old one of course). He observed that this one simple patch cured much of the instability he had been experiencing!
One can spend some time hunting around for newer versions of SHW32.DLL on the internet. To save you the trouble, you can download it here. Just follow these instructions:
- Open up Windows Explorer, or My Computer.
- Go to your system32 folder. This will usually be C:\WINDOWS\system32 or C:\WINNT\system32
- Locate the file shw32.dll and rename it to shw32.dll.old so that you can preserve your original copy. If you look at the file properties before you re-name it, you will observe that this old version was released by the same company (MicroQuill Software) and has the same product name (SmartHeap) as the new version you'll download, which suggests that the new one is compatible.
- Download shw32.dll
Right click on the link above, select "Save Target As" and save to your system32 folder. This is version 6.00.3, which I believe is the latest. If you find a newer one, please let me know at alex<at>unicorn.us.com. The old version installed by TradeStation is 4.01.2. Run FreeMem Standard.
Plaxsoft has a useful free utility called FreeMem that you can use to free up memory that has been consumed by memory leaks, making TradeStation unstable. Just follow these instructions:
- Download FreeMem Standard
Right-click on the link above, select "Save As" and save to a temporary directory.- Install the program by executing the file you just downloaded.
- If you have TradeStation running 24 hours per day, run FreeMem and click the "Allocate and Free" button in FreeMem every couple of days.
- If you open or create new workspaces or charts after you executed "Allocate and Free," you must close down TS2000i and re-open it with all your workspaces (GlobalServer can remain running). If you don't do this, there will appear to be a data loss in the new chart, for the period that had elapsed since "Allocate and Free" was executed.
- It is best to have all your workspaces open or created before you click on "Allocate and Free."
- It is only necessary to click on "Allocate and Free" just once after all workspaces are open, but it does not hurt to do it more often.
For example, suppose you run "Allocate and Free" on Sunday evening after you opened all your workspaces, then on Tuesday morning you open or create a new workspace. You will not see the data (intraday and daily) for Monday in that new chart or workspace you just opened. All the other workspaces that were open before you ran "Allocate and Free" will still be fine. So, in order to have Monday's data show up for that new workspace, you must close all your existing workspaces and close TradeStation (you can leave GlobalServer running). Then re-open TradeStation and all your workspaces, including the new one, and you will see all the data - including Monday's data.
This is why it is necessary that you first open all your workspaces that you will be using during the week before you run "Allocate and Free."
That's it.
If you do either of those things above, or both, you should never again experience TradeStation crashing due to memory management problems. However, some people have reported that for low-memory configurations, the above won't help much. You should try to have at least 200-300 megabytes free at all times, apparently. Memory is fairly cheap; if you can upgrade to 1 GB or more, you should do so.
| Home | ProSizer | EasyLanguage | Quotes |
Copyright © 2004 by Unicorn Research Corporation
All rights reserved.