
This strategy is a trend trading system that combines the Chande Momentum Oscillator (CMO) and Bollinger Bands percentage indicator (%B). It captures market trend breakthrough opportunities by analyzing changes in price momentum and volatility. The core idea is to trade when price approaches Bollinger Band boundaries and momentum reverses, aiming to establish positions at the beginning of trends for potential significant profits.
The strategy utilizes two main technical indicators: 1. Bollinger Bands Percentage (%B): Determines overbought/oversold conditions by calculating price’s relative position within Bollinger Bands. %B below 0.2 suggests price near lower band, potential rebound; %B above 0.8 suggests price near upper band, potential pullback. 2. Chande Momentum Oscillator (CMO): Measures price momentum by calculating the difference between up and down moves. CMO turning positive indicates momentum shift to bullish, turning negative indicates shift to bearish.
Trading Signal Logic: - Long Entry: When %B crosses above 0.2 and CMO crosses above 0 - Short Entry: When %B crosses below 0.8 and CMO crosses below 0
Risk Control Suggestions: - Set reasonable stop-loss levels - Control position sizing - Regular parameter review and adjustment - Cross-validate with other technical indicators
This is a systematic trading strategy based on technical analysis, capturing market trend opportunities by combining momentum and volatility indicators. The strategy is well-designed with strong practicality and scalability. Through proper risk control and continuous optimization, it can provide stable profit opportunities for traders. It is recommended that traders conduct thorough backtesting and parameter optimization before live trading, and make appropriate adjustments based on specific trading instrument characteristics.
/*backtest
start: 2024-02-22 00:00:00
end: 2024-12-08 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("CMO + Bollinger Bands (%B) Strategy", overlay=true)
// Parameters for Bollinger Bands
bb_length = input.int(20, title="Bollinger Bands Length")
bb_mult = input.float(2.0, title="Bollinger Bands Multiplier")
// Calculate Bollinger Bands
basis = ta.sma(close, bb_length)
dev = bb_mult * ta.stdev(close, bb_length)
upper = basis + dev
lower = basis - dev
// Calculate %B
percentB = (close - lower) / (upper - lower)
// Parameters for Chande Momentum Oscillator
cmo_length = input.int(14, title="CMO Length")
// Calculate CMO
cmo = ta.cmo(close, cmo_length)
// Plot Bollinger Bands and %B
plot(basis, color=color.blue, title="Basis")
p1 = plot(upper, color=color.red, title="Upper Band")
p2 = plot(lower, color=color.green, title="Lower Band")
fill(p1, p2, color=color.rgb(173, 216, 230, 90), title="Bollinger Bands Fill")
hline(0, "Zero Line", color=color.gray)
hline(0.8, "Upper %B Threshold", color=color.red, linestyle=hline.style_dashed)
hline(0.2, "Lower %B Threshold", color=color.green, linestyle=hline.style_dashed)
// Plot CMO
plot(cmo, title="Chande Momentum Oscillator", color=color.purple)
hline(0, "CMO Zero Line", color=color.gray)
// Calculate crossover and crossunder for consistency
crossover_pB_0_2 = ta.crossover(percentB, 0.2)
crossover_cmo_0 = ta.crossover(cmo, 0)
crossunder_pB_0_8 = ta.crossunder(percentB, 0.8)
crossunder_cmo_0 = ta.crossunder(cmo, 0)
// Buy Signal
longCondition = crossover_pB_0_2 and crossover_cmo_0
if (longCondition)
strategy.entry("Long", strategy.long)
// Sell Signal
shortCondition = crossunder_pB_0_8 and crossunder_cmo_0
if (shortCondition)
strategy.entry("Short", strategy.short)
// Display signals on the chart
plotshape(series=longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")