Type/to search

Peak-to-Peak Pattern Based Trading Strategy

Cryptocurrency
Created: 2024-02-20 15:40:58
Last modified: 2 years ago
1
Follow
1782
Followers

img

Overview

The strategy is named "Peak-to-Peak Pattern Based Trading Strategy". It mainly uses the peak-to-peak pattern in candlestick charts to determine entries and exits. This is a technical analysis based strategy.

Strategy Principle

The strategy defines rising peak (upFractal) and falling peak (downFractal) to identify the peak-to-peak pattern in candlestick charts.

Specifically, the judgment logic for rising peak is: the high of current candlestick is the highest of recent n candlesticks, and the high of subsequent candlesticks does not exceed the current one.

The judgment logic for falling peak is: the low of current candlestick is the lowest of recent n candlesticks, and the low of subsequent candlesticks does not break below the current one.

Boolean variables and loops are used here to determine the relationship between previous n and later n candlesticks' high/low and that of the current one, and eventually identify rising and falling peaks.

Therefore, the core logic of this strategy is:

  1. Identify rising peaks and falling peaks
  2. Long on rising peaks and short on falling peaks

Advantage Analysis

The advantages of this strategy include:

  1. Peak-to-peak pattern is easy to identify, simple to operate
  2. Based on technical pattern, not affected by fundamentals
  3. Possible smaller drawdowns

Risk Analysis

There are also some risks with this strategy:

  1. Inaccurate peak-to-peak pattern judgment, may miss best entry timing
  2. Hard to set stop loss when market moves violently
  3. Only relies on pattern, ignores other factors

Counter measures:

  1. Adjust parameters of peak-to-peak pattern to optimize the logic
  2. Combine with other indicators to determine stop loss position
  3. Use together with fundamental or other analysis

Optimization Directions

Some directions to optimize the strategy:

  1. Increase parameter tuning options to better identify peak-to-peak patterns
  2. Add stop loss logic
  3. Consider trading volume, volatility and other indicators
  4. Combine different timeframe analysis

Summary

This strategy is simple to operate with possibly smaller drawdowns based on the peak-to-peak pattern principle. But still has some risks and needs to be combined with other analysis methods to maximize its performance. Next step is to improve on accuracy of pattern judgment, stop loss, indicator optimizations etc.

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

//@version=5
strategy("sanju parmar", shorttitle="sanju trading empire", overlay=true)

// Define "n" as the number of periods and keep a minimum value of 2 for error handling.
Strategy parameters
Strategy parameters
Periods
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)