Trevor Harnett
posted this on February 18, 2010 10:40
If you find that MarketDelta is consuming more of your computer's resources than you wish, there are a few measures you can take that might help MarketDelta run more efficiently.
There are many dimensions to keep check in MarketDelta: method for monitoring and writing tick ata, number of instruments, amount of data, number of technical indicators, complexity of indicators, and recalculation frequency to name a few. How many windows/charts are open, how many indicators are calculating on how many instruments, how complex are these indicators, how many bars are these indicators calculating results for, how often are these indicators being calculated. We will take a look at each of these below and discuss ways to minimize the effect of each.
SETUP / PERFORMANCE
This is the single biggest thing you can to adjust the performance of MarketDelta, especially if using MarketDelta to monitor tick data with the Footprint (requires tick data) or any other chart or technical indicator that required tick data.
It can be accessed by clicking SETUP | PREFERENCES | PERFORMANCE (detailed information)
Process All - requires MarketDelta to process BOTH quotes and trades, even for qoute updates that don't result in a trade. (Works with the Footprint chart)
Process B/A Price Changes Only - only processes quote changes that result in a change in the bid or ask price. Also processes all trades. (Works with the Footprint chart)
Ignore All - Ignores all non-trade information and only processes trade information.
Accummulate N ticks before writing to disk - this controls how often MarketDelta will write to the disk to store accummulated data. The larger the value the better performance you should receive because there will be less frequent writes to the database.
Fast Market Mode - If checked, this forces MarketDelta into a state where the most current price takes priority and NOT every tick. This would be simliar to how many of the brokers send out data in a "snapshot" manner. See the Fast Market Mode FAQ for more detailed information.

CHARTS
Viewing Period
One common source of inefficiency is an inflated "Viewing Period" on an intraday chart. It's quite all right to expand your viewing period after hours or from time to time if you need to view a larger historical timeframe, but in general, you should keep your viewing period to the minimum you need for trading, while the session is open. You can find the "View Period" tab within the chart preferences. (Double-click in the horizontal scale along the bottom of the chart to access the chart preferences). On a 1-minute chart, I would suggest last 2-5 days. On a 60-minute chart, maybe last 10-20 days. The key is to keep from loading tens of thousands of bars or more into the chart, which would be the case if you were viewing 30 days of 1-minute bars (11,700 bars using a standard session). So viewing period (number of bars) is the first dimension you should be aware of.

Technical Indicators
Some technical indicators obviously require more processing than others, including Signal Statistics, Quote Page Statistics, Mixed Periodicity Data, System Simulator, Custom Indicators, Color Markers, and Paint Bars. Some of these indicators, which can be customized with the RTL language (including Custom Indicators, etc.) can be as inefficient as the user wants to make them, depending on the complexity and form of the RTL syntax. A single custom indicator that is very complex and inefficient can potentially bring your system to its knees.
Calculation Statistics
There is a way to get a good indication of any indicators that may be causing inefficiency problems within your charts using the "Calc Statistics". First, open your chart and let it run for some time during market hours so that new trades are getting sent into the chart. A few minutes on an active stock should be plenty. Just give it enough time for maybe 50+ trades to come in. Now, right-click on the chart and choose "Calc Statistics". You will get a list of all the indicators in the chart, and how much average processor time is spent each time the indicator is calculated. The list will be split up into "Indicators with < 1 ms avg calc time" and "Indicators with >= 1 ms avg calc time". The "< 1ms" list is of no concern. Those indicators are fine. Take a look in the ">= 1" list (there may be no indicators in this list...which is good). The key number is the average calculation time, which will begin the line and look something like this "38 ms avg.". This would represent 38 milliseconds of CPU time per calculation, on average. It takes 1,000 milliseconds to make up a second, so we probably wouldn't be too terribly concerned about this one. If you see some that are 100ms, 200ms, or more, then those probably need to be looked at more closely. (Again, we're concerned with average time here, not necessarily total). This means every time a trade comes into the chart, that indicator is taking that much time to calculate. A very active instrument with several 200ms indicators in a chart could certainly be causing problems. In many cases, these problem/inefficient indicators will be RTL based indicators that you've created (Custom Indicators, Scan Markers, Paint Bars). You should run this test on each of your charts that you keep open during trading.
Recalculation Frequency
If you've found some inefficient indicators that you just can't do without, maybe you can improve things by decreasing the "recalc frequency" for that indicator. The recalc frequency dictates how often that indicator will be recalculated in order to get a value for the current bar that reflects the latest prices. The default (in "Setup Prefs: Charts: General") is generally setup for "Once every price change". This means that every time the instrument's price changes, the indicator will be recalculated. You can either change the default (which will change all chart indicators globally) or change the recalc frequency on an individual basis by simply opening up the preferences for that indicator in the chart. The recalc frequency options are at the bottom or the indicator preference window, labeled "Recalculate every...". If you have some extremely inefficient indicator that you can't do without, I recommend you try changing the recalc frequency for these indicators to "every 1 minute" or "every 30 seconds" and see if that doesn't help. You may also choose to just change the default setting to something less frequent and affect all indicators on a global basis (all setup to use "default").

QUOTE PAGES
Quote Pages can also be sources of inefficiencies. First, understand that a quote page or a chart must be open, or it consumes no resources whatsoever. So don't be concerned with quote pages or charts that just happen to be in the system but you never use (you can actually just delete those if you wish by going to "Control: Database Management: Delete/Rename: ..."). There are three dimensions to be concerned with in quote pages: the number of instruments, the number of columns, and custom columns. The greatest of these concerns will likely be custom columns.
Number of Instruments
Obviously, the more instruments that are active in a quote page, the more instruments that Market Delta is tracking and getting data from the data service for. Only watch the instruments that you are interested in. Don't keep a quote page open of the entire Nasdaq when you are only interested in 30 or so instruments. You may want to narrow down your intraday watch list each day by scanning daily data for candidates.
If you are running a scan on daily data to narrow down your candidates, I would recommend following these steps before or after market hours (once per day):
This may seem like a lot of steps, but almost every one can be done on a schedule. Two clever schedules can execute all these tasks. And since the schedules can be run using keyboard shortcuts, two keystrokes and all the work above is done. (We'll try to put together a tutorial in near future to explain this).
The key is that you don't "watch" more instruments that you really need to. An instrument is "watched" if it is either open in quote page or chart OR it is marked for Intraday. If it is marked for Intraday monitoring, it is always being watched (when it's session is open). You can quickly take a look at all the symbols you have marked for Intraday by opening up the ".Intraday" system quote page.
Custom Columns
Now that we've eliminated any unwanted instruments (rows), it's time to focus on the columns. Custom columns can cause similar inefficiency problems as technical indicators in charts. And just as indicators in charts, the problems will generally be greater when the custom column is based upon RTL-based indicators (Custom Indicators, etc). Custom columns have an advantage over technical indicators in charts in that they only have to calculate one value (as opposed to a value for every bar), but they have the disadvantage in that they have to load the data and calculate a value for every instrument in the quote page, while charts generally work on only one instrument. So it's a trade-off.
Unfortunately, there are no "calculation statistics" currently for quote pages, so you'll have to do your indicator efficiency testing in charts, as was described above. Generally, if you have an indicator causing calculation inefficiencies in charts, then it may likely cause similar inefficiencies in quote pages. Custom columns do however have a "recalc frequency" setting. This can be found in the "Calculation" tab. If your custom column is based upon an inefficient indicator, or you just don't need the column recalculated very often, decrease the frequency of calculation (maybe every 30 seconds or every 1 minute). For large quote pages, this can make a big difference. Also note that when a sort is requested on a custom column, the custom column is automatically recalculated before the sort is performed in order to give an accurate up-to-date picture after sorting.
Updating Dynamically?
Another efficiency measure can be found inside the quote page preferences. At the bottom of the quote page preferences, there is a choice for update frequency. Quote pages generally default to "dynamic" updating, which means they will update every time any instrument in the quote page receives new data. This can tax the system somewhat. If you don't necessarily need to see quote page information that dynamically, you might try changing this update setting to maybe "every 5 seconds" or "every 10 seconds" and see if that helps.
COMPUTER
There is a possibility that files in either MarketDelta or your datafeed have become fragmented. Here's how to check for and correct this issue:
Select: Start | All Programs (or Programs) | Accessories | System Tools | Disk Defragmenter
They key is this -- it is not really how many charts or quote pages you have open, but instead, what you are asking these charts and quote pages to do for you. How complex are the indicators involved in those charts, how often are these indicators being calculated, how much data is loaded into the charts, and how many instruments are being monitored on an intraday basis. By keeping an eye on these factors, you can really help minimize the processor load of MarketDelta.
We do not doubt that some MarketDelta users have systems that are overburdening their processor, which can lead to data lags, etc. We can assure you that when MarketDelta is first installed, there are no efficiency or data lag problems. As you started creating your custom indicators, adding custom columns, loading up charts with indicators, adding instruments, creating custom instruments, etc, etc....the program eventually began to slow down.
There is no self-imposed "limit" within MarketDelta when it comes to how many charts you can have, how many indicators can be in each chart, how many instruments you can add, how complex your custom indicators can be, etc. And when MarketDelta gets overburdened, it does not stop calculating an indicator, or tracking an instrument, or refreshing a custom column, just so things can get caught back up. Therefore, as a user, you must impose some limits, that will satisfy your trading needs within the confines of the system you are running on.
And a faster processor and/or more CPU will always help as well!
NOTE (PC Clock Sync Settings): If you are experiencing continuous lag on your QuotePage, your PC's system clock may be out of sync causing the realtime data to be delayed. To sync your system clock > Go to the right side of the Start Menu where the clock is located > (For Windows XP) Double Click the clock > Click the Internet Time Tab > Select the dropdown time.nist.gov > Press Apply > Click "Update Now". (For Windows Vista/7) Left click and select " Change Data and Time Settings" in Windows Vista/7 > Click the Internet Time Tab > Click "Change Settings" > Select the dropdown time.nist.gov > Press Apply > Click "Update Now". Lastly, make sure on all Windows XP/Vista/7 that the "Synchronize with an Internet Time Server" is checked.