Type/to search

Trend Following Strategy Based on Stochastic and CCI

Cryptocurrency
Created: 2023-11-22 16:23:31
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy combines Stochastic indicator and CCI indicator to identify trend direction, and uses Rate of Change indicator to filter out range-bound trends, in order to follow the trend. The strategy adopts breakout entry and stop loss exit.

Strategy Logic

  1. Stochastic indicator judges bullish/bearish pattern
    Golden cross of Stochastic is buy signal, while death cross is sell signal
  2. CCI indicator determines trend direction
    CCI above 0 indicates bullish market, while below 0 bearish market
  3. Rate of Change indicator filters range-bound trend
    Set parameters of Rate of Change to judge whether price is in an active trend
  4. Entry and exit rules
    Long entry: Stochastic golden cross & CCI > 0 & active trend
    Short entry: Stochastic death cross & CCI < 0 & active trend
    Stop loss exit: 3% stop loss for both long and short side

Pros Analysis

  1. Combination of Stochastic and CCI improves accuracy of trend judgment
  2. Rate of Change filters out range-bound trends, avoiding invalid trades
  3. Both long and short trading, able to catch different trend types
  4. Breakout entry timely catches trend opportunity
  5. Strict stop loss prevents huge loss and controls risk

Risks Analysis

  1. Improper parameter setting may lead to over-conservative or aggressive strategy
  2. Limited effect of indicators, may fail in extreme market conditions
  3. Breakout entry misses early stage of trends, giving up part of profit
  4. Too tight or too wide stop loss fails in risk control

Optimization Directions

  1. Parameter optimization to find optimum combination
  2. Add more trend indicators to improve effectiveness
  3. Use trailing stop loss or time-based stop loss to reduce chance of stop loss breach
  4. Add risk metrics like max drawdown to fully control risk

Summary

This strategy judges trend direction by integrating Stochastic, CCI and Rate of Change indicators, and catches trend opportunity with breakout tracking. Its pros lie in accurate judgment empowered by indicator combination, filtering of range-bound market, and strict stop loss for risk control. The next step is to further improve the strategy via parameter optimization, multiple indicators, stop loss strategy to make it more robust and flexible.

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

//@version=4
strategy("Stochastic CCI BF 🚀", overlay=false, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.075)

/////////////// Time Frame ///////////////
Strategy parameters
Strategy parameters
Backtest Start Year
Backtest Start Month
Backtest Start Day
Backtest Stop Year
Backtest Stop Month
Backtest Stop Day
CCI Length
RSI Length
RSI-EMA Length
roclength
pcntChange
Stop Loss %
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)