DISCLAIMER: This program is only a test version I used to test my idea and it was never meant to be shared with anyone. It is buggy but I can't spend more time with it because I don't have subscription for CQG IC anymore (after today). I will work more on this later when I have more time to devote for it. I decided to share it after all because I think it is a nice tool and somebody might find it useful. Also this might be a fresh idea for many of you. Source code is provided so feel free to tinker with it (my apologies for lack of comments). I couldve made this program for some other platforms as well but to my knowledge only CQG has very extensive DOM data (10+ levels up and down on many instruments) and its supposed to be more reliable.
I have been studying lately how to use DOM data for trading. It can be hard to read raw DOM data directly from DOMTrader so I figured some kind of tools are necessary for this. DOM is constantly manipulated by big institutions and trading algorithms so the coming DOM ticks need to be filtered. For example DOM flashes (big dom level that disappears if price comes near or touches it) should be filtered out, if possible. I have created a method that uses Exponential Moving Average filtering modified in a way that filtered value always need to be lower than raw data value. If filtered value is higher, filtered value is reseted to the raw data value. That way if some DOM levels shows even one tick that has low depth the filtered dom level value is reseted to that raw DOM value. 200 seconds smoothing is used for EMA.
Price data is a bit unnatural/difficult to represent in bars when DOM data is represented in very short interval though it would be definitely possible to do so. Price data is represented as two lines, best bid price and best ask price and vwap dots. Buying and selling volume is represented as green or red dots in the chart. The size of the dot is relative to the amount of volume that occurred on that level. For red dots only selling volume is counted and then Volume Weighted Average Price (VWAP) is calculated out of those sells and dot is placed on that VWAP level. The opposite is true for green dots. Volume aggregation time and dot relative size modifier can be adjusted in chart settings (different instruments have very different characteristics and values should be adjusted to make the chart prettier). High filtered DOM levels are shown as red or green lines above or below the current price. Shade of the color corresponds to the depth of the level.
Adjustable parameters in the program are VolInterval (volume aggregation interval in seconds), VolScale (multiplier to adjust volume/price dot size), UpdInterval (how often we print new DOM levels in chart, unit seconds), Minutes (how many minutes to chart), Auto Clear checkbox (if there is more data than is shown the rest will be cleared).
If you want to graph the whole day then I recommend parameters like this:
VolInterval: 5-10, VolScale: 0.3-1, UpdInterval: 5, Minutes: any, Auto Clear: False.
To start (run DOMChartSmooth\bin\Release\DOMChart.exe), write a symbol name in the textbox and press enter. If you want a new symbol you have to start a new instance of the program. If you just write a new symbol in the textbox and press enter its unlikely to work because I didn't do the necessary code behind for that. CQG IC has to be started as well for the API to function properly.
In the screenshots I have unfiltered DOM data and filtered DOM data (30 minutes, exactly same period). The program I will upload here has filtered DOM data with 200 second EMA. If you want to change that setting you have to edit the source code (i should't have hardcoded this like that but I was lazy), file DOMLevel and double EMA_ALPHA (stupid, i know).