The resource loading... loading...

Dual Balanced Bulls and Bears Strategy

Author: ChaoZhang, Date: 2023-10-30 10:31:17
Tags:

img

Overview

The Dual Balanced Bulls and Bears strategy is a combination strategy that incorporates the 123 Reversal strategy and Bulls and Bears Balance indicator. It aims to verify signals from the 123 Reversal strategy with the Bulls and Bears Balance indicator for more reliable market entry.

Principles

The strategy consists of two sub-strategies:

  1. 123 Reversal strategy. It generates signals when the last two closing prices show reversal, i.e. go long when the previous two closing prices were declining while the third closing price rises, and go short when the previous two closing prices were rising while the third closing price declines. It also incorporates the STOCH indicator to only take signals when STOCH shows oversold or overbought conditions.

  2. Bulls and Bears Balance indicator strategy. It judges the market trend by calculating the balance between bullish and bearish forces. Specifically, it uses the difference between the current closing price and opening price, as well as the difference between the current and previous day to determine the bullish and bearish forces. The larger the difference between bullish and bearish forces, the more pronounced the trend.

The combined strategy sources its trading signals from the signals generated by the two sub-strategies. It will only take a signal, e.g. go long, when the two sub-strategies give consistent signals, i.e. both signal to go long. If the signals from the two sub-strategies differ, the combined strategy will skip that signal and remain sidelines.

Advantages

The biggest advantage of the Dual Balanced Bulls and Bears strategy is its high reliability. By requiring consistent signals from both sub-strategies before entering a trade, it serves as a verification mechanism to avoid false signals. In addition, with the two sub-strategies tapping opportunities from reversal and trend sides respectively, the strategy offers diversification to mitigate risks from a single strategy.

The 123 Reversal strategy can capture short-term reversal opportunities in the market. The Bulls and Bears Balance strategy can determine the direction of the longer-term trend. Using both enables capturing reversals while sticking to the major trend, filtering out weaker reversal signals and increasing win rate.

Risks

The biggest risk is that the probability of wrong signals from the sub-strategies doubles. Although the combined strategy requires consistent signals, if both sub-strategies give wrong signals at the same time, the combined strategy will still enter the trade, incurring doubled losses.

Also, conflicts can arise between the sub-strategies, with one signaling to go long while the other short. The combined strategy will then miss opportunities. Prolonged conflicts may prevent the combined strategy from entering for a long time, decreasing capital efficiency.

Optimization

Consider incorporating a trend-reversal strategy as a third sub-strategy. It can help determine the longer-term trend and give signals when the trend reverses. Adding a strategy to judge the market trend can further filter out false signals and increase stability.

Another direction is adjusting the parameters of the sub-strategies for more aligned signals. For example, adjusting the threshold parameters of the Bulls and Bears Balance strategy to capture weaker trends and complement the reversal strategy.

Handling prolonged conflicts between the sub-strategies can also be researched. For example, setting a maximum tolerance level for conflicts, after which the signal from an individual sub-strategy will be taken. This can alleviate opportunity loss to some extent.

Conclusion

The Dual Balanced Bulls and Bears strategy combines the 123 Reversal strategy and Bulls and Bears Balance strategy to achieve dual verification of trading signals and effectively filter out false signals and increase stability. Meanwhile, combining reversal and trend strategies provides diversification to lower risks. The strategy can be further optimized by adjusting parameters, adding a third strategy etc. to improve alignment and capital efficiency. Overall, the strategy has novel ideas and substantial practical value.


/*backtest
start: 2023-09-29 00:00:00
end: 2023-10-29 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 03/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
//    This new indicator analyzes the balance between bullish and
//    bearish sentiment.
//    One can cay that it is an improved analogue of Elder Ray 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

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

    value2 = 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))))))
    nBBB = value2 - value
    pos := iff(nBBB < SellLevel, -1,
    	   iff(nBBB >= BuyLevel, 1, nz(pos[1], 0))) 
    pos

strategy(title="Combo Backtest 123 Reversal & Bull And Bear Balance", 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=0.01)
BuyLevel = input(15, step=0.01)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posBullAndBearBalance = BullAndBearBalance(SellLevel, BuyLevel)
pos = iff(posReversal123 == 1 and posBullAndBearBalance == 1 , 1,
	   iff(posReversal123 == -1 and posBullAndBearBalance == -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