Type/to search

VWMA and ATR Trend Following Strategy

Cryptocurrency
Created: 2023-11-07 16:39:47
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy uses VWMA to determine the trend direction and sets stop loss with ATR to follow the trend. It is suitable for markets with obvious trends.

Strategy Logic

  1. Use VWMA to determine the trend direction. Go long when price is above VWMA, go short when price is below VWMA.

  2. Add RSI oscillator filter to avoid false breakout signals. Only take long signal when RSI is above 30.

  3. Use ATR to calculate the stop loss line. ATR length is set to be the same as VWMA, multiplier is 3.5. Stop loss line updates in real time.

  4. The ATR multiplier controls the tightness of the stop loss line. Larger multiplier means less frequent update, which is better for following the trend.

  5. Position size is calculated based on account equity and stop loss percentage.

  6. Exit long position when price breaks below the stop loss line.

Advantages

  1. Using VWMA to determine trend catches trend opportunities persistently.

  2. RSI filter avoids some false breakout signals.

  3. ATR trailing stop follows the trend and avoids being stopped out by reversals.

  4. Position sizing based on account equity and stop loss favors risk management.

Risks

  1. Potential loss at trend turning points. Should reduce position size to limit losses.

  2. Improper ATR parameter setting leads to too tight or loose stop loss line. Parameters should be tested.

  3. Fast trend reversal may cause stop loss update to lag, increasing losses.

  4. In low volatility environments, reduce position size and increase stop loss update frequency.

Enhancement

  1. Test different VWMA parameter combinations to find optimal signal parameters.

  2. Test other RSI settings like overbought/oversold lines.

  3. Test ATR multiplier to find optimal balance between drawdown and tracking ability.

  4. Add other filters like MACD, KD to improve signal quality.

  5. Optimize position sizing and stop loss percentage based on market volatility.

Summary

The strategy has an overall trend-following bias and catches obvious price trends well. It has advantages in trend determination, signal filtering, stop loss trailing etc. It also has risks in trend reversal. Fine tuning parameters and position sizing can lead to better performance.

Source
Pine
/*backtest
start: 2023-10-07 00:00:00
end: 2023-10-13 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mohanee

//@version=4
Strategy parameters
Strategy parameters
VWMA Length
ATR length
ATR Multiplier
RSI of VWMA Length
Risk % of capital
Stop Loss
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)