The upper plot is the total number of shares or contracts offered for sale in the Level 2 order book. The lower plot is the total number of shares or contracts bid to buy in the Level 2 Order Book. The yellow plot is the bids minus the offers.
Maxrows is the user setting that controls how many rows of the order book are counted. In panel 2 we have the totals for all ten of the bid and all ten of the ask rows. In panel 3, with Maxrows set at 5, we see the totals for the 5 inside rows of bid and ask.
This will work in realtime or market replay mode. Changing any chart settings deletes existing plots, and there is no backfill. This limitation is because of the way Ninjatrader stores data. I started working on a DOMRecorder indicator to correct this. May take a while.
Thanks ZTrade for the idea of this indicator, and for the original implementation which worked fine in NT6.5 but had problems because of undocumented changes in NT7.
NEW! Updated on March 1 because of run time errors in NT7B10. Cleaned up the code in the OnMarketDepth method, and removed list row creation from Plot method.
The Histogram Width Factor gives you full control of that width, and is a double, not an integer. For the ES you might want to go as low as 0.15. Also note that the bar opacity is on a scale of 0 to 255.
The histogram will auto scale according to the width of the chart, to always leave some space to the left of the longest histogram bar regardless of your Histogram Width Factor setting.
You can also select the number of rows to display with MaxRows, under Level II Settings. For most instruments, you can get a maximum of ten levels of bid and ask.
Thanks to John Thom for the original version and to RJay for the updated version. All I did was make it run in NT7. I am a strong advocate of migrating to NT7 ASAP.
This is a level 2 indicator. It measures market supply, not market volume.
This indicator can display all levels, a range of levels, or just a single level of supply in the level 2 book.
There are three variables with this indicator that can be set.
Beginning level, ending level, and smooth.
The first two sub panels are displaying all levels, raw data, then smoothed.
The last two sub panels are displaying just level 0, raw data, then smoothed.
( Note: Level 0 supply is the supply that current best price Market Orders transact with.)
Because of the spike nature of book levels, I have built in the optional smooth feature which takes an EMA of the last 5 bars, minus the highest and lowest values of the five.
In the smooth setting, this indicator begins plotting after the fifth bar.
This is a level 2 indicator. It measures market supply, not market volume.
This indicator can display all levels, a range of levels, or just a single level of supply in the level 2 book.
There are three variables with this indicator that can be set.
Beginning level, ending level, and smooth.
The first two sub panels are displaying all levels, raw data, then smoothed.
The last two sub panels are displaying just level 0, raw data, then smoothed.
( Note: Level 0 supply is the supply that current best price Market Orders transact with.)
Because of the spike nature of book levels, I have built in the optional smooth feature which takes an EMA of the last 5 bars, minus the highest and lowest values of the five.
In the smooth setting, this indicator begins plotting after the fifth bar.
This is a level 2 indicator. It measures market supply, not market volume.
This indicator can display all levels, a range of levels, or just a single level of supply in the level 2 book.
There are three variables with this indicator that can be set.
Beginning level, ending level, and smooth.
The first two sub panels are displaying all levels, raw data, then smoothed.
The last two sub panels are displaying just level 0, raw data, then smoothed.
( Note: Level 0 supply is the supply that current best price Market Orders transact with.)
Because of the spike nature of book levels, I have built in the optional smooth feature which takes an EMA of the last 5 bars, minus the highest and lowest values of the five.
Also, the bar colors reflect the raw data direction, even on the smoothed version. This accounts for some red bars above and green bars below the center line in the smoothed version.
In the smooth setting, this indicator begins plotting after the fifth bar.
NEW! Version G35 updated on Feb 18. (If you already have an older version, please remove it before importing this latest version, or the import may fail. The installer was prepared by NT7. If the import into NT6.5 fails, remove the info.xml file from the zip folder and try the import again.) All volumes now display as integers. In zero centered mode, trades above the ask and below the bid are overlaid on the buy and sell bars in colors you can select. Set those colors to transparent if you do not want to see those trades. In the new BelowBidAndAboveAsk filtermode, ONLY the volumes of trades meeting those criteria are shown.
Zero-Centered display option shows buy volume above, and sell volume below, the zero line. PaintSpecialColor setting assigns a different color to bars having buy and sell volume within 5% of each other. The buy, sell, and total volumes can be set to any desired widths without hiding each other. You can choose to show the actual values from the zero line of buy and sell volume, or show the bar composition, where the buy and sell volumes are stacked to equal the total volume.
This screen shot has FIVE instances of the indicator showing the different display options. If you change the colors, note that BuyVolume and BuyVolume2 should be the same color.
For data persistence it is best to have an environment variable named GOMFOLDER, which designates a destination folder that can be located and named any way you choose. If there is no GOMFOLDER Environment Variable, the data files will be stored in your My Documents folder. You also need a GomRecorderIndicator that is "Recording OK". You can turn on recording from the settings panel of THIS indicator without having to run a separate GomRecorder.
Only Total Volume will be plotted for periods when the GomRecorder was not "Recording OK".
Gomi made this possible, with his outstanding, incredible, generous contributions. Note the "Recording Off" text in the lower left corner of the indicator windows. That shows that this indicator is a subclass of the GomRecorder Indicator.
Many thanks to ZTrade101 for great ideas and inspiring feedback, and to RJay for valuable insights into market action.
I recommend running CalcuateOnBarClose=false. Ninjatrader 7 is more efficient, so is preferred to keep CPU usage reasonable.
July 30th, 2014 07:30 PM bobc635 Thanks Zondor.... I have another version... look forward to looking at this. I use it along with GOMIs Ladder and Volum
e tools.
January 3rd, 2014 08:32 PM XxBrianxX Thanks Zondor
October 6th, 2013 11:02 PM cibarcena The title says v2 but you included the old version jtRealstatsNT7v106. Thanks
November 30th, 2012 06:35 AM dilbert618 Thank you Zondor