NC UVOL DVOL Description
NC UVOL DVOL is a UVOL DVOL indicator for NinjaTrader 8 that puts up volume against down volume, and it comes with the full C# source code. I like to know what the whole stock market is doing behind my trades, and NYSE up volume against down volume is one of the quickest ways to see it. You can chart ^UVOL and ^DVOL on their own, but I wanted one line with the difference under my chart. Then I turned both symbols and the math into settings, so it works with any pair. The catch: your data feed has to provide the symbols you pick.
How it works. It loads two extra data series with the same bar type and period as your chart: Series A (^UVOL by default) and Series B (^DVOL by default). On every bar of your chart it takes the latest close of each symbol at or before that bar's time and combines them with the Action you choose: Subtract (the default, A minus B), Add, Multiply or Divide. With the defaults you get net up volume, ^UVOL minus ^DVOL. If Divide would divide by zero, it repeats the previous value. Because it always uses the last known close, it lines up fine under a chart that trades longer hours than the symbols; outside their hours the value just stays flat.
What you see. A histogram called Net in its own panel: green bars when the result is above zero, red when it's below. With the defaults, green means up volume beats down volume. It calculates on bar close.
How to use it. Put it under an index future or ETF chart as a breadth filter: favor longs while net up volume is positive and growing, and be careful with them when it's negative. Watch for divergences too, like price making a new high while the net value makes a lower high. Series A and Series B take any symbol name, so you can compare other pairs, like two indexes or two stocks, and Divide turns any pair into a ratio.
Make it yours. Like all my frameworks, it comes with a code review video that explains how it works. Use it as is, learn from the code, or change it yourself or with AI like Claude. You could add a moving average of the net value, an alert when it crosses zero, or a third symbol in the formula. The code is short, with one method that lines the bars up and one that does the math, so a new Action only takes a few lines. Have some good trades!