Type/to search

Price Channel and Moving Average Based Trend Following Strategy

Cryptocurrency
Created: 2024-02-06 09:46:23
Last modified: 2 years ago
1
Follow
1782
Followers

img

Overview

This strategy identifies and follows trends by constructing a Price Channel to calculate the deviation of price from the middle line and using moving averages to filter signals. Trading signals are generated when price breaks through the Channel. The strategy has both trend following and breakout characteristics.

Strategy Logic

  1. Build Price Channel
  • Calculate highest high and lowest low over the past len periods
  • Middle line is average of highest high and lowest low
  • Distance is absolute deviation of price from middle line
  • Smooth distance to get upper and lower bands
  1. Determine Trend Direction
  • When price is below lower band, define as downtrend
  • When price is above upper band, define as uptrend
  1. Generate Trading Signals
  • In uptrend, long when price is below open or breaks below upper band
  • In downtrend, short when price is above open or breaks above lower band

Advantage Analysis

  1. Captures mid- to long-term trends
  2. Combines with breakout signals to avoid ineffective trading in range-bound markets
  3. Customizable parameters suit different products

Risk Analysis

  1. More minor losses possible in oscillating trends
  2. Inappropriate parameter settings may miss trend reversals
  3. Monitor trade frequency to prevent overtrading

Optimization Directions

  1. Add other indicators to filter signals
  2. Dynamically adjust Price Channel parameters
  3. Incorporate stop loss to optimize risk management

Conclusion

The strategy is overall quite robust in tracking mid- to long-term trends effectively while generating trading signals through trend breakouts. Further improvements can be made through parameter optimization and signal filtering to adapt the strategy to more products and market environments.

Source
Pine
/*backtest
start: 2023-01-30 00:00:00
end: 2024-02-05 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/


//@version=2
strategy("Noro's Bands Strategy v1.1", shorttitle = "NoroBands str 1.1", overlay=true)
Strategy parameters
Strategy parameters
Long
Short
Period
Color
Show Bands
Show Background
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)