MW Volume ImpulseMW Volume Impulse
Settings
* Moving Average Period: The moving average period used to generate the moving average line for the bar chart. Default=14
* Dot Size: The size of the dot that indicates when the moving average of the CVD is breached. Default=10
* Dot Transparency: The transparency of the dot that indicates when the moving average of the CVD is breached. Default=50
* EMA: The exponential moving average that the price must break through, in addition to the CVD moving
* Accumulation Length: Period used to generate the Cumulative Volume Delta (CVD) for the bar chart. Default=14
Introduction
Velocity = Change in Position over time
Acceleration = Change in Velocity over time
For this indicator, Position is synonymous with the Cumulative Volume Delta (CVD) value. What the indicator attempts to do is to determine when the rate of acceleration of buying or selling volume is changing in either or buying or selling direction in a meaningful way.
Calculations
The CVD, upon which these changes is calculated using candle bodies and wicks. For a red candle, buying volume is calculated by multiplying the volume by the spread percentage of the average of the top and bottom wicks, while Selling Volume is calculated multiplying the volume by the spread percentage of the average of the top and bottom wicks - in addition to the spread percentage of the candle body.
For a green candle, buying volume is calculated by multiplying the volume by the spread percentage of the average of the top and bottom wicks - plus the spread percentage of the candle body - while Selling Volume is calculated using only the spread percentage average of the top and bottom wicks.
How to Interpret
The difference between the buying volume and selling volume is the source of what generates the red and green bars on the indicator. But, more specifically, this indicator uses an exponential moving average of these volumes (14 EMA by default) to determine that actual bar size. The change in this value indicates the velocity of volume and, ultimately, the red and green bars on the indicator.
- When the bar height is zero, that means that there is no velocity, which indicates either a balance between buyers and sellers, or very little volume.
- When the bar height remains largely unchanged from period to period - and not zero - it means that the velocity of volume is constant in one direction. That direction is indicated by the color of the bar. Buyers are dominating when the bars are green, and sellers are dominating when the bars are red.
- When the bar height increases, regardless of bar color, it means that volume is accelerating in a buying direction.
- When the bar height decreases, regardless of bar color, it means that volume is accelerating in a selling direction.
The white line represents the moving average of the bar values, while the red and white - and green and white - dots show when the moving average has been breached by the Cumulative Volume Delta value AND the price has broken the 7 EMA (which is user editable). As with most moving averages, a breach can indicate a move in a bearish or bullish direction, and the sensitivity can be adjusted for differing market conditions
Other Usage Notes and Limitations
For better use of the signal, consider the following,
1. Volume moving below the moving average can indicate that the volume may be ready to exit an overbought condition, especially if the bars were making lower highs prior to the signal - regardless of bar color.
3. Volume moving above the moving average can indicate that the volume may be ready to exit an oversold condition, especially if the bars were making higher lows prior to the signal - regardless of bar color.
Additionally, a green dot that occurs with a positive (green) Cumulative Volume Delta can indicate a buying condition, while a red dot that occurs with a negative (red) Cumulative Volume Delta can indicate a selling condition. What this means is that buying or selling momentum briefly went against the direction of buying or selling Cumulative Volume Delta , but was not strong enough to change the buying or selling direction. In cases like this, once the volume begins to accelerate again in the direction of the buying or selling volume - indicated by a red or green dot - then the price is more likely to favor the direction of the Cumulative Volume Delta and its corresponding acceleration.
Although a red or green signal can indicate a change in direction, this script cannot predict the magnitude or duration of the change. It is best used with accompanying indicators that can be used to confirm a direction change, such as a moving average, or a supply or demand range.
Cumulativemovingaverage
Long Term: Cumulative Moving AverageWho to use?
This indicator is for Long Term Investors or for Position trading and not for Day traders.
What time-frame to use?
• Daily, Weekly or Monthly
What is Blue line?
• Blue line is Cumulative Moving Average. It is cumulative sum of closing price.
• It is a trend reversal level.
• It is a strong support level.
• If price is below Blue line better not to take any Long position until it crosses above it.
What are Red lines?
• Red lines are Multiplier levels.
• These are target levels to exit the position.
• It can be breakout or pull back levels.
• The level combination numbers can be fully odd or even numbers.
• For example in certain stocks the working levels will be 1x, 3x, 5x etc., in others it will be even numbers like 2x, 4x, 6x etc.
• In some cases the levels need to be tweaked with custom decimals like 1.1x, 2.1x, 3.1x, 4.1x etc. to align the support & resistance levels.
How to use?
Entry
• Enter when the Price reach closer to the Blue line.
• Enter Long when the Price takes a pullback or breakout at the Red lines.
Exit
• Exit position when the Price reach closer to the Red lines in Long positions.
Indicator Menu
• Works only in higher time-frames like D, W & M.
• Will not work in Lower time-frames less than "D" or the Launch Date shows wrong in Lower time-frames.
Multipliers:
(Read above What are Red lines?)
Launch Date:
• Launch Date: Starting date of stock when it appeared in the exchange. Works only in D, W & M timeframes.
• Years: Total number of years from the Launch Date. Accurate date will be shown in Daily timeframe.
• Candles Count: Total number of candles from the Launch Date in the current timeframe.
Labels:
• First number is last traded price.
• Second number in () is percentage change from last traded price to that level.
Edge-Preserving FilterIntroduction
Edge-preserving smoothing is often used in image processing in order to preserve edge information while filtering the remaining signal. I introduce two concepts in this indicator, edge preservation and an adaptive cumulative average allowing for fast edge-signal transition with period increase over time. This filter have nothing to do with classic filters for image processing, those filters use kernels convolution and are most of the time in a spatial domain.
Edge Detection Method
We want to minimize smoothing when an edge is detected, so our first goal is to detect an edge. An edge will be considered as being a peak or a valley, if you recall there is one of my indicator who aim to detect peaks and valley (reference at the bottom of the post) , since this estimation return binary outputs we will use it to tell our filter when to stop filtering.
Filtering Increase By Using Multi Steps Cumulative Average
The edge detection is a binary output, using a exponential smoothing could be possible and certainly more efficient but i wanted instead to try using a cumulative average approach because it smooth more and is a bit more original to use an adaptive architecture using something else than exponential averaging. A cumulative average is defined as the sum of the price and the previous value of the cumulative average and then this result is divided by n with n = number of data points. You could say that a cumulative average is a moving average with a linear increasing period.
So lets call CMA our cumulative average and n our divisor. When an edge is detected CMA = close price and n = 1 , else n is equal to previous n+1 and the CMA act as a normal cumulative average by summing its previous values with the price and dividing the sum by n until a new edge is detected, so there is a "no filtering state" and a "filtering state" with linear period increase transition, this is why its multi-steps.
The Filter
The filter have two parameters, a length parameter and a smooth parameter, length refer to the edge detection sensitivity, small values will detect short terms edges while higher values will detect more long terms edges. Smooth is directly related to the edge detection method, high values of smooth can avoid the detection of some edges.
smooth = 200
smooth = 50
smooth = 3
Conclusion
Preserving the price edges can be useful when it come to allow for reactivity during important price points, such filter can help with moving average crossover methods or can be used as a source for other indicators making those directly dependent of the edge detection.
Rsi with a period of 200 and our filter as source, will cross triggers line when an edge is detected
Feel free to share suggestions ! Thanks for reading !
References
Peak/Valley estimator used for the detection of edges in price.