Type/to search

Momentum Breakout Strategy

Common strategy
Created: 2024-01-17 13:58:19
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy is a trend following strategy that utilizes the price momentum indicator. It judges the market trend by calculating the closing price change over a certain period and makes corresponding long or short entries when there is a persistent upward or downward price trend.

Strategy Logic

The core indicator of this strategy is price momentum. The momentum is calculated as:

momentum = close - close[n]

where n represents the length of the momentum period. When momentum > 0, it means that the price has been rising during the current period. When momentum < 0, it means the price has been falling over the current period.

The strategy first sets a confirmBars parameter, which represents the number of candlesticks needed for the trend judgment before executing trades. Within the backtest range, if momentum > 0 persists for confirmBars candlesticks, a long entry is made. If momentum < 0 persists for confirmBars candlesticks, a short entry is made.

The key to the strategy's trend judgment lies in counting the number of consecutive candlesticks where momentum is greater than or less than 0, which is accomplished through the bcount and scount variables. They are incremented by 1 when the corresponding condition is met and reset to 0 when the condition is not met. When the count reaches confirmBars, the corresponding long or short trade is executed.

Strategy Advantages

This is a relatively simple trend following strategy with the following advantages:

  1. Simple logic that is easy to understand and implement
  2. The momentum indicator is sensitive to price changes and can quickly capture trends
  3. Customizable parameters to adjust judgment sensitivity
  4. Can be used in various market environments

Strategy Risks

The strategy also has some risks:

  1. Prone to multiple oscillating trades and overtrading
  2. Reasonable parameter configuration is needed, especially confirmBars to filter oscillations
  3. Cannot effectively cope with the impact of sudden market events
  4. Differences between backtest and live trading, data and parameter optimization needed

Strategy Optimization

The strategy can be optimized in several aspects:

  1. Add stop loss logic to control per trade risk
  2. Add breakout filters to avoid false signals from price oscillations
  3. Adjust confirmBars etc. parameters based on different products and market environments
  4. Incorporate other indicators to confirm entries
  5. Use machine learning methods to adapt parameters and filters

Summary

In summary, this momentum breakout strategy is a simple and practical trend following strategy suitable as a introductory quant trading strategy. In application, attention is needed to control trade frequency and prevent overtrading. Meanwhile, parameters and filters need to be adjusted and optimized based on actual products and market environments for the strategy to achieve maximum performance.

Source
Pine
/*backtest
start: 2024-01-09 00:00:00
end: 2024-01-16 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Momentum Strategy [TS Trader]", overlay=true)

confirmBars = input(1)
Strategy parameters
Strategy parameters
confirmBars
Momentum Length
Backtest Start Year
Backtest Start Month
Backtest Start Day
Backtest End Year
Backtest End Month
Backtest End Day
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)