mwrightinc

Price and Volume Stochastic Divergence [MW]

Introduction

This indicator creates signals of interest for entering and exiting long and short positions on equities. It primarily uses up and down trends defined by the change in cumulative volume with some filtering provided by a short period exponential moving average (9 EMA by default).

Settings

  • Moving Average Period: The moving average over which the cumulative volume delta is calculated. Default: 14
  • Short Period EMA: The EMA used to represent price action, and is used to generate the EMA Delta line. Default: 27 (3*3*3)
  • Long Period EMA: The second EMA used to calculate the EMA Delta line. Default: 108 (2*2*3*3*3)
  • Stochastic K Value: The value used for stochastic curve smoothing. Default: 3
  • Dot Size: The diameter of the larger indicator. Default: 10
  • Dot Transparency: The transparency level of the outer ring of the primary BUY/SELL signal. Default: 50 (0 is opaque, 100 is transparent)
  • Band Distance from 0 to 100: The upper and lower band distance. Default: 20

Calculations
The cumulative volume delta (CVD) 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.

Once we have the CVD, we can then perform a stochastic calculation of the CVD value.

stochastic calculation = (current value - lowest value in period) / (highest value in period - lowest value in period)

We’ll do the same stochastic calculation for the short term EMA (27 EMA default) as well as for the difference between the short term and long term EMA.

When the stochastic CVD value is rising from zero and the short term EMA stochastic value equals 100, then it’s a major bullish signal. When the stochastic CVD value is falling from 100 and the short term EMA stochastic value equals 0, then it’s a major bearish signal.

Sometimes, after a bullish or bearish signal, the stochastic CVD will reverse direction triggering a new opposing signal.

How to Interpret
The CVD indicates when there is either more buying than selling or vice versa. A value over 50 for the stochastic CVD curve represents more buying taking place. A value below 50 represents more selling. One might intuitively believe that when there is more buying volume than selling volume that the price would follow suit. This is not always the case.

Most of the time buying volume will precede consistent price movement upwards, and selling volume will precede consistent price movement downwards. When this divergence occurs, the indicator generates a signal. When this divergence begins to fail, and buying or selling volume reverses, then another signal is generated indicating that the buying/selling impulse is headed back into the direction of price action.

These interactions are visually represented on the chart with the coral line that represents CVD, and the yellow line that represents the EMA, or the average price. When the coral line goes up and the yellow line stays down, that’s the BUY signal. When the coral line goes down and the yellow line stays up, that’s the sell signal. When the coral line switches direction, the chart generates another signal showing that volume is moving in a direction that supports the price.

The orange line represents the stochastic representation of the difference between the short EMA (27 by default) and the long EMA (108 by default). EMA differences is a method that can be used to define a trend. When a short term EMA is above a longer term EMA, that may represent a bullish trend. When it is below, that may represent a bearish trend. When all 3 lines are rising or falling in the same direction at the same time, it tends to indicate a movement that has the potential to continue.

Other Usage Notes and Limitations

It's important for traders to be aware of the limitations of any indicator and to use them as part of a broader, well-rounded trading strategy that includes risk management, fundamental analysis, and other tools that can help with reducing false signals, determining trend direction, and providing additional confirmation for a trade decision. Diversifying strategies and not relying solely on one type of indicator or analysis can help mitigate some of these risks.

This indicator can be paired with the MW Volume Impulse indicator if it is desired to see the actual buying and selling cumulative volume deltas. Also, in many cases, the BUY and SELL signals tend to correspond with Keltner Bands (ATR Bands) becoming extended. Lastly, volume weighted average price (VWAP) along with other macro events can impact price and negate signals. To view VWAP lines, you may choose to use the Multi VWAP or Multi VWAP for Gaps indicator to help ensure that the signals you see in this indicator are not being affected by VWAP lines.

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?