Type/to search

Dynamic Re-entry Buy-only Strategy

Cryptocurrency
Created: 2023-12-19 13:56:55
Last modified: 2 years ago
1
Follow
1779
Followers

img

Overview

This strategy is a buy-only trading system that generates buy signals based on moving average crossovers and the Weekly Commodity Channel Index (CCI) or Weekly Average Directional Index (ADX). It produces buy signals when the fast moving average crosses above the slow moving average and when the Weekly CCI and/or Weekly ADX meet specified conditions.

The strategy also allows for dynamic re-entry, which means it can open new long positions if the price goes above the three moving averages after an exit. However, the strategy will exit the long position if the price closes below the third moving average.

Strategy Principle

The script defines the conditions for generating buy signals. It checks two conditions for a valid buy signal:

  • The fast moving average crosses above the slow moving average
  • The user can choose to filter trades using Weekly CCI or Weekly ADX

Dynamic Re-entry: If there is no active long position and the price is above all three moving averages, a new long position is opened.

Exit Condition: If the closing price drops below the third moving average, the script closes the long position.

Advantage Analysis

The advantages of this strategy include:

  1. Using multiple technical indicators to filter signals reduces false signals
  2. The dynamic re-entry mechanism maximizes the capture of trends
  3. Being long-only avoids the risks of shorting

Risk Analysis

The risks of this strategy include:

  1. There is some risk of whipsaws
  2. Long holding times could be too long, requiring stops
  3. Poor parameter settings may cause too frequent trading

Solutions:

  1. Use better parameter combinations and indicator combinations to filter
  2. Set reasonable stop losses
  3. Adjust parameters to ensure stability

Optimization Directions

This strategy can be optimized by:

  1. Testing more technical indicator combinations to find better entry timing
  2. Optimizing parameters to find the best parameter combinations
  3. Adding stop loss mechanisms to control single loss
  4. Adding position sizing to increase/decrease positions based on market conditions

Summary

This dynamic re-entry buy-only strategy integrates multiple technical indicators to determine entry timing and adopts a dynamic re-entry design to track trends in real-time. Being long-only avoids shorting risks. Through parameter optimization, stop losses, and position sizing, this strategy can be implemented in live trading to control risk while capturing excess returns.

Source
Pine
/*backtest
start: 2022-12-12 00:00:00
end: 2023-12-18 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Buy Only Strategy with Dynamic Re-Entry and Exit", overlay=true)

// Input Parameters
Strategy parameters
Strategy parameters
Fast Moving Average Length
Slow Moving Average Length
Third Moving Average Length
CCI Period for Weekly CCI
Use CCI for Entry
Use ADX for Entry
ADX Length
ADX Threshold
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)