OPEN-SOURCE SCRIPT

TASC 2024.08 Volume Confirmation For A Trend System

█ OVERVIEW

This script demonstrates the use of volume data to validate price movements based on the techniques Buff Pelz Dormeier discusses in his "Volume Confirmation For A Trend System" article from the August 2024 edition of TASC's Traders' Tips. It presents a trend-following system implementation that utilizes a combination of three indicators: the Average Directional Index (ADX), the Trend Thrust Indicator (TTI), and the Volume Price Confirmation Indicator (VPCI).


█ CONCEPTS

In his article, Buff Pelz Dormeier recounts his search for an optimal trend-following strategy enhanced with volume data, starting with a simple system combining the ADX, MACD, and OBV indicators. Even in these early tests, the author observed that the volume confirmation from OBV notably improved trading performance. Subsequently, the author replaced OBV with his VPCI, which considers the proportional weights of volume and price, to enhance the validation of trend momentum. Lastly, the author explored the inclusion of his TTI, a modified MACD that features volume-based enhancements, as a strategy component for improved trend-following performance.

According to the author's research, the ADX+TTI+VPCI system outperformed similar strategies he tested in the article, yielding significantly higher returns and enhanced perceived reliability. Because the system's design revolves around catching pronounced trends, it performs best with a portfolio of individual stocks. The author applies the system in the article by allocating 5% of the equity to long positions in S&P 500 components that meet the ADX+TTI+VPCI entry criteria (see the Calculations section below for details). He uses the proceeds from closing positions to enter new positions in other stocks meeting the screening criteria, holding any excess proceeds in cash.


█ CALCULATIONS

The TTI is similar to the MACD. Its calculation entails the following steps:
  1. Calculate fast (short-term) and slow (long-term) volume-weighted moving averages (VWMAs).
  2. Compute the volume multiple (VM) as the square of the ratio of the fast VWMA to the slow VWMA.
  3. Adjust these averages by multiplying the fast VWMA by the VM and dividing the slow VWMA by the VM.
  4. Calculate the difference between the adjusted VWMAs to determine the TTI value, and take the average of that series to determine the signal line value.


The VPCI utilizes differences and ratios between VWMAs and corresponding simple moving averages (SMAs) to provide an alternative volume-price confirmation tool. Its calculation is as follows:
  1. Subtract the slow SMA from the VWMA of the same length to calculate the volume-price confirmation/contradiction (VPC) value.
  2. Divide the fast VWMA by the corresponding fast SMA to determine the volume-price ratio (VPR).
  3. Divide the short-term VWMA by the long-term VWMA to calculate the VM.
  4. Compute the VPCI as the product of the VPC, VPR, and VM values.


The long entry criteria of the ADX+TTI+VPCI system are as follows:
  • The ADX is above 30.
  • The TTI crosses above its signal line.
  • The VPCI is above 0, confirming the trend.


Signals to close positions occur when the VPCI is below 0, indicating a contradiction.

NOTE: Unlike in the article, this script applies the ADX+TTI+VPCI system to one stock at a time, not a portfolio of S&P 500 constituents.


█ DISCLAIMER

This strategy script educates users on the trading system outlined by the TASC article. By default, it uses 10% of equity as the order size and a slippage amount of 5 ticks. Traders should adjust these settings and the commission amount when using this script.
Trend AnalysisVolume

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


Tools and ideas for all Pine coders: tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
更多:

免责声明