OPEN-SOURCE SCRIPT

Volume Exponential Moving Averages (EMA)

109

Description:
This script is a simple script that plots a desired exponential moving average of buy and sell volume as a line chart with a tunable smoothing factor. There is a highlight on the plot area of either green or red to denote if the EMA of buy volume or sell volume is of a higher value. This indicator uses basic math of exponential averages and calculates volume using the formulas: "buy volume" = the product of total volume and the "closing price" minus the "low price" divided by "high price" minus the "low price" for a specific candle. Conversely, "sell volume" = the product of "total volume" and the "high price" minus the "close price" divided by "high price" minus the "low price" for a specific candle.

Utility:
This indicator is an effective way to gauge the acceleration/ deceleration of buyers and sellers in the market and can be used in combination with market structure and important levels to understand if buyers or sellers are taking over at any given time.

How to use this indicator:

There are two settings for this indicator:
1. The Length of the EMA: The length of the EMA can be adjusted based on your preference for a running number of candles' data. If you are interested to know short term changes in volume (e.g. over the past few candles at a major level) you can adjust this setting lower (~3-9 length). Conversely, if you are interested in volume trends over a greater number of candles you can increase this to your liking.
Personal preference: Because I am a short term daytrader/ scalper, I keep this setting at 6 length to see immediate changes in the acceleration or deceleration of buyers/ sellers.

2. The Smoothing Factor: The smoothing factor can be adjusted to further tune the size of trend you are interested in with 1 = No smoothing of the EMA line. Smoothing of the EMA line increases as the value for smoothing increases, resulting in a less volatile, more smooth EMA line. However, the more smooth the line, the less sensitive the EMA will be to immediate changes in volume pace. The less smoothing factor is applied, the more volatile data will be, resulting in quicker observation of shorter term trends. Again the same rules apply as the EMA length as these are similar in function: If you are interested to know short term changes in volume (e.g. over the past few candles at a major level) you can adjust this setting lower (~2-6). Conversely, if you are interested in volume trends over a greater number of candles you can increase this to your liking.
Personal preference: Because I am a short term daytrader/ scalper, I keep this setting at 2-4 smoothing factor to see immediate changes in the acceleration or deceleration of buyers/ sellers.

You should, of course, play with these settings to your exact preferences based on your trading style.

Tips for using this indicator:

General Use:
When the buy volume EMA is moving up, buyers are increasing the pace of buying and when the buy volume EMA is moving down, buyers are decreasing the pace of buying. Conversely, when the sell volume EMA is moving up, sellers are increasing the pace of selling and when the sell volume EMA is moving down, sellers are decreasing the pace of selling. The overall movement of the stock is relative to the combination of these rates. e.g. If both buyers and sellers are increasing at the same rate (EMAs slopes are roughly equal) there will be not a large change in price. If the slope of the buy volume EMA is greater than the slope of sell volume EMA, the price should move up. Conversely, if the slope of the sell volume EMA is greater than the slope of buy volume EMA, the price should move down.

Predicting pullbacks, reversals, and continuations:
This indicator allows you to see if buyers or sellers are increasing their pace, even if the stock price is in consolidation. This allows you to predict if out of the consolidation buyers or sellers are likely to win based on the momentum of the volume in consolidation. e.g. If price is in consolidation after an uptrend and the buy volume EMA starts to decrease, this could be a sign that buyers are running out of steam at this price level. Another example, If at a major support the buy volume EMA begins to trend up then buyers are accelerating the pace of buying at this level.

EMA crosses: There is something to be said about the point at which the buy volume EMA and sell volume EMA cross. This signifies that at this moment there is a shift in which the acceleration of one party outpaces that of the other and can result in increased speed of the movement of the stock price.

Considerations
Because volume changes constantly, this indicator is best to identify short term changes in volume that could impact price movements. It is not guaranteed to continue just because buyers or sellers have had a change in pace. Therefore it is advised to use this indicator in combination with significant price levels such as pivot points, or price levels from volume profile tools to identify the price zones where significant volume changes are likely to impact price movements. It is also advised to continue to monitor the changes in pace in buyers and sellers using this volume EMA indicator to determine if a change in pace is short lived or if it will continue for a longer duration.

Examples of use:
Bullish Reversal:
תמונת-בזק

Bearish Continuation:
תמונת-בזק

Bearish EMA Crossover: (Settings: Length 6, Smoothing factor 3)
תמונת-בזק

Bullish EMA Crossover: (Settings: Length 6, Smoothing factor 4)
תמונת-בזק

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.