Editors' picks
OPEN-SOURCE SCRIPT

RedK Volume-Accelerated Directional Energy Ratio (RedK VADER)

Updated
The Volume-Accelerated Directional Energy Ratio (VADER) makes use of price moves (displacement) and the associated volume (effort) to estimate the positive (buying) and negative (selling) "energy" behind the scenes, enabling traders to "read the market action" in more details and adjust their trading decisions accordingly.

How does VADER work?
------------------------------------
I have always been a fan of technical analysis concepts that are simple, and that integrate both price action and volume together - The concept behind VADER is really a simple one.

Let's walk though it as we avoid getting too technical:
  • Large price moves that are associated with large volume means buyers (if the move is up) or sellers (when the move is down) are serious and are "in control" of the action
  • On the other hand, when the price moves are small but with large volume, it means there's a fight, or more of a balance of energy, between buying and selling.
  • Also when large price moves are associated with relatively limited volume, there's a lack of "energy" from either buyers or sellers - and moves likes these are usually short-lived.


The analogy with VADER, is that we look at price moves (change of close between 2 bars) as the displacement (or action result) and the associated volume as the "effort" behind this action -- Combining these 2 values together, the displacement and the effort, gives us a representation or a proxy of the underlying energy (in a specific direction).
when both values (displacement and effort) are high, then the resulting energy is high - and if one of these values are low, the resulting energy is low.

we then take an average of that relative energy in each direction (positive = buying and negative = selling) and calculate the net energy.

note that we're approaching the analogy here from a trading perspective and not from physics perspective :) -- we can be forgiven if the energy calculation in physics is different ..


VADER Plots
---------------------
  • the blue line with crosses represents the positive energy - or the buying strength
  • the orange line with circles represents the negative energy - or the selling strength
  • the thick Green / Red main line plot represents the net energy - and generally the main signal to be looking out for is when that line crosses 0 up or down - but i find it also very valuable to keep an eye on the individual energy lines as they sometimes "tell a story" like we see in the chart above,


Volume Calculation:
----------------------------

snapshot

- VADER by default is a volume-weighted indicator - it uses the volume associated with change in bar close value (Full mode) as an accelerator in the calculation of the directional energy

- VADER introduces another method of integrating volume, by considering "relative" or "differential" volume (Relative mode) - in this mode, we consider the ratio of volume above the minimum volume observed within a "lookback" length - so practically, ignoring the minimum volume. in other words, if a price move is associated with very low volume, it gets very low "volume accelerator" (close to 0) and if the move is associated with very large volume, it gets the maximum volume accelerator (1 or close to 1) - The relative mode of volume calculation magnifies volume effect and ignores the low volume values that may just act as noise. test both modes and find which one works better for you.

- VADER also has the ability to work without volume (volume calculation = None) - and will revert to that mode when used with instruments that have no volume data. In that mode, VADER will behave similar to an RSI (but not exactly like it given the underlying calculation is different)

- We can also setup VADER at a specific resolution / timeframe that is different than the chart.

Using VADER & Other Thoughts
----------------------------------------

The main signal to look out for, is when VADER's Green / Red line crosses the zero line.
Green (above zero) represents that the net energy is with the buyers and we should favor long positions
Red (below zero) reflects that the sellers have control and we should favor short positions (or consider to close longs)

*** However, VADER should be used as a *secondary indicator* - given the big influence of volume on the calculation - VADER doesn't directly track price trend or momentum - VADER needs to be used in the context of other indicators that show trend and momentum - i would suggest you combine VADER with Moving Averages or other trend tracking indicators on the price chart, MACD, RSI and / or other trend and momentum indicators you're already familiar with.

Suggested setup:

snapshot

There's more to add to VADER in future versions - alerts, control level, maybe improve visuals... etc - please share your feedback as you start experimenting with VADER.. good luck! (and of course, May the Force be with you :) )
Release Notes
RedK VADER v2.0 with few tweaks :
================================

* Added alerts when VADER goes green (crosses 0 line up), when it goes red (crosses 0 line down) or when it swings from above/below zero line.
* added a fix for cases where no price change between 2 consecutive bars
* some code commentary and other minor tweaks
Release Notes
RedK VADER v3.0 adds some new nice features:
===========================================
1. Dual VADER: ability to show another VADER line calculated for a slower length, that represents "sentiment"
- For better visuals, the sentiment is represented by a 4-color histogram that is placed in the background of all plots - with proper transparency not to clutter the view too much. Some other default colors have been adjusted for that purpose too. By default the sentiment is hidden and needs to be enabled from the indicator settings
- In other indicators where I have fast/slow plots - that helps expose the "relative short-term gain" vs a longer baseline (rather than just using the 0 value - I usually choose the sentiment length to be 4 or 5 times the faster length. in VADER, the default length for the sentiment is 20
- One of the other nice uses of the sentiment plot, is you can also set it to be close to the fast length (fast is 5 by default, so say 8), and use it as an alert of possible upcoming change - similar to how we use a MACD signal line. New Alerts have been added to support this scenario

2. Options to change the MA calculation type for the base Directional Energy (DER) : choose between SMA, EMA, and WMA - my preference is WMA given the responsiveness and the front-weighting ensuring recent price & volume action are immediately reflected in VADER - Feel free to experiment with this setting

3. As mentioned above, 2 new alerts have been added for VADER when it crosses the sentiment up or down. The alerts will work regardless if the sentiment plot is hidden or displayed - and they indicate a change in "relative speed" of "gain"

4. other small changes, visual improvements and code comments

Here's how VADER v3 looks compared to VADER v2, when the Sentiment plot is exposed. See how sentiment plot helps expose false breakouts.
snapshot

Please continue to share feedback and comment .. Hope VADER works well for you!
Release Notes
RedK VADER v4.0 update fixes Relative Volume calculation issue reported by m_b_round (thank you!)
Centered OscillatorsEnergy CommoditiesmultitimeframeredkvaderVolumevolumeweighted

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer