Type/to search

Reversal Short-term Breakout Trading Strategy

Cryptocurrency
Created: 2023-11-21 17:03:32
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy aims to capture short-term reversal trading opportunities. It will open short position after N consecutive up-bars and close position after M consecutive down-bars. It also incorporates time frame filter and stop loss/take profit features.

Logic

  1. Input parameters: Number of consecutive up-bars N, consecutive down-bars M
  2. Definition:
    • ups counts number of up-bars, price>price[1] then +1, otherwise reset to 0
    • dns counts number of down-bars, price<price[1] then +1, otherwise reset to 0
  3. Entry: short when ups≥N; close position when dns≥M
  4. Exit: fixed stop loss/take profit or end of time frame

Pros

  1. Capture reversal trading chances, suitable for short-term trading
  2. Flexible time frame setting catering to different trading plans
  3. Embedded stop loss/take profit facilitating risk management

Risks

  1. Short-term reversal may fail and reverse again leading to loss
  2. Reasonable N, M parameters needed, too large or small unfavourable
  3. Improper stop time may unable to stop loss in time

Optimization Directions

  1. Combine with trend indicator to avoid against trend trades
  2. Dynamic adjustment of parameters N, M
  3. Optimize stop loss mechanism

Conclusion

The strategy captures short-term trading opportunities through statistical K-line patterns. Reasonable parameter tuning and risk control measures are crucial for steady profits. Further improvements on combining trend analysis and dynamic parameter adjustment may lead to even better performance.

Source
Pine
/*backtest
start: 2023-11-13 00:00:00
end: 2023-11-20 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4

// Strategy
strategy("Up/Down Short Strategy", overlay=true, initial_capital = 10000, default_qty_value = 10000, default_qty_type = strategy.cash)
Strategy parameters
Strategy parameters
Consecutive Bars Up
Consecutive Bars Down
Backtesting Start Date
Backtesting End Date
Time Frame To Enter Trades (Optional)
Enable Close Trade At End Of Time Frame
Enable Take Profit & Stop Loss
Stop Loss Ticks
Take Profit Ticks
Long Entry message (Optional)
Short Entry message (Optional)
Close Long message (Optional)
Close Short message (Optional)
Take Profit message (Optional)
Stop Loss message (Optional)
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)