Binomial Momentum Breakout Reversal Strategy

Author: ChaoZhang, Date: 2024-02-28 17:20:02
Tags:

img

Overview

The Binomial Momentum Breakout Reversal Strategy combines the Stochastic indicator and Bull Power indicator to implement dual signal filtering and reversal trading at market turning points to chase oversold and overbought situations.

Strategy Logic

The strategy consists of two parts:

  1. 123 Reversal Strategy

    It uses the reversal strategy proposed by Ulf Jensen in his book “How I Tripled My Money in the Futures Market”. It goes long when the close price is higher than the previous close for 2 consecutive days and the 9-day slow stochastic is below 50; it goes short when the close price is lower than the previous close for 2 consecutive days and the 9-day fast stochastic is above 50.

  2. Bull Power Indicator

    It uses the momentum indicator proposed by Vadim Gimelfarb in his book “Bull and Bear Balance Indicator”. It judges the bullish/bearish power by calculating the relationship between the current K-line and previous K-line, and generates trading signals.

The strategy combines the above two single signal strategies. It generates trading signals only when the signals of two strategies are consistent to implement dual signal filtering.

Advantage Analysis

The strategy combines the advantages of reversal strategies and tracking strategies. It can capture reversal signals timely when the market shows signs of reversal, while reducing false signals through dual signal filtering to avoid chasing highs and selling lows. The main advantages are:

  1. Using the 123 pattern to determine market turning points and identify oversold and overbought situations.
  2. The dual signal filtering mechanism avoids false signals generated by single indicators and improves the quality of trading signals.
  3. Reversal trading to seize the trend opportunities brought by market reversals.
  4. Large parameter optimization space to adapt to different market environments by adjusting indicator parameters.

Risk Analysis

The strategy also has some risks:

  1. Reversal failure risk. Identifying reversal signals has some difficulty. The probability of prices continuing the original trend after giving reversal signals is also very high.
  2. Opportunity loss when inconsistent signals between two indicators.
  3. Inaccurate identification of reversal signals due to inappropriate parameters.
  4. The strategy is more suitable for medium- and long-term trading. The effect of short-term trading is not very good.

The counter measures:

  1. Adopt stop loss strategies to control single loss.
  2. Optimize parameters. Different combinations can be selected for different varieties.
  3. Combine other indicators as auxiliary judgment.

Optimization Directions

The strategy can be further optimized in the following aspects:

  1. Test the impact of different parameters on strategy performance to find the optimal parameter combination. For example, adjust the cycle parameters of the Stochastic indicator, the smoothing parameters of the KDJ indicator, etc.
  2. Increase stop loss strategies to control single losses. Can set stop loss points combined with the ATR indicator.
  3. Combine other indicators for signal verification. For example, MACD, KD, RSI and other indicators can be considered when generating trading signals.
  4. Use machine learning algorithms to optimize parameters and achieve dynamic adjustment of parameters.

Summary

The Binomial Momentum Breakout Reversal Strategy combines the Stochastic indicator and Bull Power indicator to achieve dual signal filtering and reversal trading. It can seize market reversal opportunities and avoid noise generated by single signals. It is a stable and effective quantitative strategy. The strategy can be improved through parameter optimization, stop loss strategies, signal verification, etc., making it suitable for more varieties and market environments. It has great potential for optimization and application.


/*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=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 05/07/2019
// This is combo strategies for get a cumulative signal. 
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The 
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close 
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
// The strategy sells at market, if close price is lower than the previous close price 
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
//  Bull Power Indicator
//  To get more information please see "Bull And Bear Balance Indicator" 
//  by Vadim Gimelfarb. 
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
    vFast = sma(stoch(close, high, low, Length), KSmoothing) 
    vSlow = sma(vFast, DLength)
    pos = 0.0
    pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
	         iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0))) 
	pos

BullPower(SellLevel, BuyLevel) =>
    pos = 0
    value = iff (close < open ,  
             iff (close[1] < open ,  max(high - close[1], close - low), max(high - open, close - low)),
              iff (close > open, 
               iff(close[1] > open,  high - low, max(open - close[1], high - low)), 
                 iff(high - close > close - low, 
                  iff (close[1] < open, max(high - close[1], close - low), high - open), 
                   iff (high - close < close - low, 
                     iff(close[1] > open,  high - low, max(open - close, high - low)), 
                      iff (close[1] > open, max(high - open, close - low),
                       iff(close[1] < open, max(open - close, high - low), high - low))))))
    pos := iff(value > SellLevel, -1,
	         iff(value <= BuyLevel, 1, nz(pos[1], 0)))
    pos

strategy(title="Combo Backtest 123 Reversal & Bull Power", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
SellLevel = input(15, step=1)
BuyLevel = input(3, step=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posBullPower = BullPower(SellLevel, BuyLevel)
pos = iff(posReversal123 == 1 and posBullPower == 1 , 1,
	   iff(posReversal123 == -1 and posBullPower == -1, -1, 0)) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1, 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	 
if (possig == 0) 
    strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )

More