VolumeProfile:
Check out the videos on….
![]() |
What steps should I follow to install for first time? (ATTN: Trial Users!)
- Download CDA_VolumeProfile zip install package
- Save copy of CDA_VolumeProfile zip file to local folder (e.g. …\Documents\NinjaTrader 7\import)
- Import NinjaScript….Select CDA_VolumeProfile zip from local folder
- Add CDA_VolumeProfile indicator to an ES CME US Index Futures RTH (session) chart for current contract month
- Request copy of current ES RTH VAP cache files to get you started.
- Copy ES Minute and Tick VAP CMEUSIndexFuturesRTH cache files for current contract month to C:\CDA_VP\cache folder
- Refresh chart (“Reload NinjaScript” or F5) or open the workspace you copied.
Why don’t I see any profiles after installing the indicator?
- The default setting of the indicator’s OperationalMode parameter is set to UseCache and it cannot find the Volume-At-Price (VAP) cache files in the HistoricalCacheFolder. If you set the OperationalMode parameter to UseMinuteData, you will see profiles right away.
- There are 2 types of VAP cache files; Minute and Tick. I use the Minute VAP cache to span farther back in time when the detailed accuracy achieved with Tick volume data is not necessary; this is the case for the full composite profile. The Tick VAP cache files typically don’t go back any further than 30-60 days. IMPORTANT: cache files are based on a specific market instrument, contract month, session-template combination.
- If you join my CDA_VolumeProfile Dropbox folder, you can get copies of the VAP cache files I use for those markets and session I trade; this is offered free of charge to help save users time.
What steps should I follow to install an update?
- Download new package from website download page.
- Close all workspaces that may be using this or prior versions of this indicator.
- Remove any CDA_VolumeProfile.xml file that may be under the …\Documents\NinjaTrader 7\templates\Indicator folder.
- Remove NinjaScript Assembly……Select prev installed CDA_VolumeProfile….zip
- Restart NinjaTrader
- Import NinjaScript….Select new CDA_VolumeProfile….zip
- Open workspace.
- Add indicator to chart.
What if I want to build my own VAP cache files…how do I do it?
- Wait until market close, then…
- Open a new chart selecting your desired instrument/contract, session template, and time span, keeping in mind whether you are building a Minute or Tick VAP cache file. Under the data series Data properties section, I always chose CustomRange for Load data based on and explicitly set the desired Start and End dates and Session template.
- Add the indicator to the chart.
- Under the Operational Parameters section, set Volume-At-Price Mode to UseTickData if time span of data series is set for 60 days or less, and you intend to build a Tick VAP cache file, or to UseMinuteData if you intend to build a Minute VAP cache file. Set RebuildHistoricalCache to true and RebuildMode to Overwrite. Make sure SuspendRealtimeProcessing (under Misc Parameter section) is false.
- Click OK. Expect it to take approximately 10-15 minutes per day when building the Tick VAP cache file; that it why it is recommended you don’t do this during RTH.
- When you regain control of NT, open the indicator and verify the indicator has automatically reset the RebuildHistoricalCache to false and Volume-At-Price Mode to UseCache. Then click Okay to refresh the session profiles now drawn this time by its reading of the saved cache file data.
- At this point, if your data series ended with today and you have verified the contents of the main (consolidated) Tick VAP cache file ends with today’s VAP data, then you can delete all daily incremental (current session) Tick VAP cache files.
What do I do if I’m away for a few days and am missing some of the daily incremental “current session” Tick VAP cache files?
- If you can’t get them from another CDA VolumeProfile trader, the best thing to do is to run a RebuildHistoricalCache using RebuildMode set to Append.
- You only need to do this for the Tick VAP cache file
- Wait until market close, then…
- Open a new chart selecting the existing instrument/contract-month and session template. But this time under the data series Data properties section, chose CustomRange for Load data based on and explicitly set the desired Start and End dates to the days you are missing, and chose the same Session template.
- Add the indicator to the chart.
- Under the Operational Parameters section, set Volume-At-Price Mode to UseTickData. Set RebuildHistoricalCache to true and RebuildMode to Append. Make sure SuspendRealtimeProcessing (under Misc Parameter section) is false.
- Click OK. Go have dinner.
- When you regain control of NT, open the chart indicator and change the theVolume-At-Price Mode to UseCache to verify the session profiles are still drawn (this time by its reading of the saved cache file data).
- The order of each block of days records within the main (consolidated) VAP cache file is not really important; that is they do not need to be ordered. However, for ease of browsing, if I ever do an Append RebuildMode, I usually move each day to the location within the file as if being ordered was important.
Is there a setting to keep the VPOC track after the refresh?
Yes, UseMinuteData mode or UseTickData mode (the glib response). However, in the more commonly used UseCache mode, unfortunately this is not possible. The reason for this may not be obvious until you understand how the caching works….remember the cache file (even the current session cache file) reflects the most recent accumulation of volume-at-price values. On a refresh, this accumulation does not “start over” (as it effectively does in UseMinuteData and UseTickData modes), so it can only “see” the single price/volume pair in the cache file that has the greatest volume (VPOC) from the last time the file was updated. If you have a current-day-only UseTickData mode 25k VB (as I do), there is a possibility I could “record” the VPOC changes from that chart and use that info in the other UseCache mode charts….a bunch of work I’m not sure is really worth the effort at this time.
I noticed you use a 2500 VB chart with only the current day….why is that?
My 2500 VB chart runs with Volume-At-Price Mode set to UseTickData. I do this to avoid having “holes” in the daily incremental Tick VAP cache file, which can happen when all your charts are set to UseCache and you have an interruption in processing the real-time stream of market data. This can happen if you have an unreliable internet connection, you are late to the RTH party and don’t have your charts running before the open, or you have a problem that causes NT or the indicator to be restarted during RTH. The daily incremental can be created/updated with the UseCache mode chart, but I chose not to let it since I want to insure the most reliable Tick VAP cache, especially for the current session!
So, I rely on my single-day 2500VB chart to maintain the current cache file, with UseTickData mode set. If there is any interruption and this chart refreshes, there will be a “penalty” in time to refresh (approx 10-15 minutes), but the cache file will be correct. To speed-up the initial opening of the workspace you may want to save the workspace with this chart’s Volume-At-Price Mode set to UseCache and then only set it to UseTickData mode when you are ready and preferably sufficient time before the open (if the Start date is still set to a prior date). I prefer this approach so I can also insure that the Start and End date is only the date of the current session, in which case, setting Volume-At-Price Mode to UseTickData mode will not cause a 15 minute delay to refresh, since that day’s RTH hasn’t yet started. Click here for a copy of my 3 chart ES RTH workspace. You will need to rename the file from ES RTH.txt to ES RTH.xml and save it under your NT workspaces folder.
If you are in the habit of frequently restarting NT or are evaluating different appearance settings, I strongly suggest you either temporarily switch the 2500VB UseTickData chart to UseCache or UseMinuteData mode, so you don’t have to wait the 15 minutes per day for it to re-process all that tick data.
What should I do if I don’t see today’s session profile or only a partial profile?
If you don’t see a session profile for the current day, that means one of the following:
- You don’t have a chart with UseTickData or UseMinuteData running, or you do and you may have un-gracefully terminated (e.g., killed) NT. This will leave CurrentSessionCacheFileUpdate.lck files in the cache folder which will need to be removed manually.
- All your chart(s) with UseCache mode have SuspendCurrentCacheFileUpdate parameter to true, or all have SuspendRealtimeProcessing (under Misc Parameter section) set to true, or
- If you have a partial profile, that usually means #1 above and at least one chart in in UseCache mode and SuspendCurrentCacheFileUpdate parameter to false, but you either didn’t start the chart prior to the open, or you had an real-time market stream interruption and had to refresh the chart. Read I noticed you use a 2500 VB chart with only the current day….why is that? FAQ.
It is good practice to make sure that only one chart has SuspendCurrentCacheFileUpdate parameter set to false. This should preferably be the chart with running with UseTickData mode as stated above.
Before opening the workspace (after detecting a problem with the current session’s profile), remove the CurrentSessionCacheFileUpdate.lck file for that market and session template as well as the current session cache file (the one that contains the date, e.g., ES09-11.Tick.VAP.CMEUSIndexFuturesRTH.201108301330.txt.
What is the Composite cache file and what do I need to know about it?
The Composite VAP cache file is a second level caching mechanism and is only used to speed up drawing of the composite profile. The data within this file simply contains the beginning date of the cache followed by price/volume pairs needed to draw the composite profile. The Composite cache file is automatically created by the indicator, whenever it detects that it is not in the cache folder and at least one instance of the indicator has ShowCompositeProfile set to true or LoadMinuteCacheFileAlso is set to true. It was developed to make processing the Minute VAP cache unnecessary on each chart refresh.
The composite profile is drawn using all the data in this file; the beginning date is at the of the file. The end date is always the greatest of the dates found in the Minute.VAP and Tick.VAP cache files (which is the normally the date of the most recent session). Therefore, you cannot specify a date span for the composite profile. When it is necessary to change the composite begin date (e.g., from 3/6/2009 to 7/1/2010) we simply save a copy of the current Minute.VAP cache file, remove the records dated 3/6/2009 through 6/30/2010, save the modified file, delete the Composite.VAP cache file, and then refresh the indicator. If you do this when the workspace is closed, it all works perfectly as expected. If you do this with the ShowCompositeProfile set to true and RefreshCompositeCacheFile OnExit, it will not rebuild the Composite VAP cache file with the new Minute VAP cached data, since OnExit only uses the current data cached in memory; if you set delete the Composite VAP cache file when you have RefreshCompositeCacheFile set to OnStartup, if will notice it needs to reload the Minute VAP cache file on startup and rebuild the Composite VAP cache file properly. Since I typically operate with RefreshCompositeCacheFile OnExit, I usually simply set ShowCompositeProfile to false on all charts before making the change (to avoid conflicts between multiple charts that are displaying the composite profile) if I’m not going to be shutting down the workspace.
The data that goes into building the Composite cache file is taken from the Minute and Tick VAP cache files after they are first loaded when the indicator starts. Normally, the Minute VAP cache file is rarely changed. However, the Tick cache current-session cache files are created daily with the real-time data stream. This means that the Composite cache file will only be updated with the latest Tick cache file data that was collected that day, only when a composite displaying chart is refreshed.
How are the cache files processed?
When the indicator starts, it first loads the data from within the Minute.VAP cache file, but only if the chart has ShowCompositeProfile set to true (and there is no Composite.VAP cache file) or if LoadMinuteCacheFileAlso is set to true. It will then load the data from the main (consolidated) Tick.VAP cache file, followed by the daily incremental “current session” Tick.VAP cache files. For any days which overlap the last files loaded take precedence. That means if you Tick.VAP data spans the past 60 days for example, the data used to draw the composite profile is based on Tick data for the past 60 days and Minute data for the days prior.
How can I improve performance?
- Minimize the number of days and options enabled on your intraday chart.
- Minimize the number of indicators especially those which process bid/ask or tick data, or whoseCalculate on bar close parameter is set to false.
- Minimize or close any chart which is not actively needed.
- Add memory to your computer; recommend a minimum of 8GB.
- Do your charting on one computer and trade management on another.
What is the .lck file and what do I need to know about it?
Generally, you do not need to be concerned about this lock file. It is a mechanism to prevent multiple instances of the indicator from updating the daily current-session cache file. It is created automatically by the indicator instance that is charged with the task of updating the daily current session cache file. If you have one or more instances in UseTickData mode and both have SuspendCurrentSessionCacheFileUpdate set to false, the last one started will be the dominate one; ”UseTickData” and a system-generated ID will be inserted in the lock file for that instance. If one or more charts in UseCache mode with SuspendCurrentSessionCacheFileUpdate set to false starts, it will reset this parameter to true if it detects the lock file is owned by a chart in UseTickData mode, otherwise the last one of these started will dominate and “UseCache” and a system-generated ID will be inserted in the file for that instance.
This synchronization mechanism was implemented to help control the updating of the daily current-session cache file and essentially makes the SuspendCurrentSessionCacheFileUpdate parameter unnecessary; I simply did not do enough testing to convince myself of that to remove it from the list. You can always explicitly set the parameter to true if you want more manual control; the locking mechanism will not auto-set the parameter to false.
If you ever suspect the daily current-session cache file is not being updated and you have a UseTickData mode chart, delete the lock file and refresh the chart. As I recall, I only had to do that went I didn’t close the workspace and exit NT gracefully. If you are using all UseCache mode charts, understand that the last chart refreshed will be dominate and will assume control for updating the daily current-session cache file which means that if this happens during RTH, the file contents will “start over” from the moment of the refresh, not from the beginning of RTH as one might expect.
Check out the videos on….
![]() |
