Type/to search

Trend Tracking Strategy Based on Dynamic Pivot Bands

Common strategy
Created: 2023-12-26 11:57:20
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy calculates the recent highest and lowest prices over a certain period, combined with the current price, to form a dynamic middle line. Red downside channel and green upside channel are then generated based on recent volatility. The three channel lines form a tradable range. When the price approaches the channel boundaries, reverse operations are carried out targeting profits back to the middle line. Meanwhile, there is a trend calculation inside the strategy to filter trades against the trend and avoid being destroyed by the major trend.

Strategy Logic

  1. Calculate dynamic middle line with recent highest price, lowest price and current close price
  2. Generate dynamic bands based on ATR and multiplier, width changes with market volatility
  3. Go long when price bounces off the bottom band, go short when bounces off the top band
  4. Have take profit and stop loss logic targeting middle line
  5. Meanwhile calculate trend index to filter trades against trend

Advantage Analysis

  1. Dynamic bands adapt to real-time market volatility
  2. High probability of trading along trend
  3. Stop loss controls single loss

Risk Analysis

  1. Improper parameter optimization may lead to overtrading
  2. Unable to completely eliminate counter-trend trades under major trends
  3. One-sided breakout may continue running

Optimization Direction

  1. Adjust parameters of bands to fit different products
  2. Fine tune trend index parameters to improve trend-trading probability
  3. Introduce machine learning elements for dynamic parameter optimization

Summary

This strategy mainly relies on the oscillation of the market to make profits. By capturing price reversal points dynamically with the bands, combined with trend filtering, it can effectively profit from mean-reversion while controlling risks. The key lies in parameter tuning to make the bands responsive yet not oversensitive. The trend index also needs proper periods to play its role. With theoretical favorable trend and stops, this strategy can achieve decent returns through optimization.

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

//@version=4
strategy(title="Strategy - Bobo PAPATR", overlay=true, default_qty_type = strategy.fixed, default_qty_value = 1, initial_capital = 10000)

// === STRATEGY RELATED INPUTS AND LOGIC ===
Strategy parameters
Strategy parameters
Pivot Length, defines lookback for highs and lows to make pivots
ATR lookback (Lower = bands more responsive to recent price action)
ATR multiplier (Lower = wider bands)
Momentum Period
Slow Period
Fast Period
Smoothing Period
Signal Period
Extreme Value
Take Profit (In Market MinTick Value)
Stop Loss (In Market MinTick Value)
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)