Strategy vault / Mean reversion
RSI BB IMI MFI Multi Indicator Collaborative Trading Signal Generation Strategy RSI BB IMI MFI
This strategy is a trading signal generation system based on multiple technical indicator collaborative analysis. The strategy integrates four classic technical indicators: Relative Strength Index (RSI), Bollinger…

Overview
This strategy is a trading signal generation system based on multiple technical indicator collaborative analysis. The strategy integrates four classic technical indicators: Relative Strength Index (RSI), Bollinger Bands (BB), Intraday Momentum Index (IMI), and Money Flow Index (MFI), utilizing cross-validation between indicators to generate more reliable trading signals. The strategy is specifically designed for 4-hour timeframes and classifies signals into regular and strong levels based on signal strength.
Strategy Principle
The core logic of the strategy is to confirm trading signals through the collaboration of multiple indicators. Specifically:
- Buy Signal Trigger Conditions:
- RSI below 30, indicating oversold market
- Price below lower Bollinger Band, showing significant price deviation
- IMI below 30, indicating weakening downward intraday momentum
- MFI below 20, showing reduced selling pressure
- Sell Signal Trigger Conditions:
- RSI above 70, indicating overbought market
- Price above upper Bollinger Band, showing significant price deviation
- IMI above 70, indicating weakening upward intraday momentum
- MFI above 80, showing reduced buying pressure
- Strong signal conditions further tighten threshold requirements based on regular signals
Strategy Advantages
- Multiple technical indicators cross-validation significantly improves signal reliability
- Distinguishes between regular and strong signals for flexible position adjustment
- Clear and simple strategy logic, easy to understand and maintain
- Adjustable indicator parameters, strong adaptability
- Integrated backtesting functionality for strategy optimization
Strategy Risks
- Multiple indicator collaboration may lead to signal lag Solution: Appropriately relax trigger conditions or introduce trend prediction indicators
- Fixed thresholds may not be suitable in different market environments Solution: Introduce adaptive threshold mechanism
- 4-hour timeframe may miss short-term opportunities Solution: Add multiple timeframe analysis
Strategy Optimization Directions
- Introduce adaptive threshold mechanism Dynamically adjust signal thresholds by calculating historical percentiles of indicators
- Add trend strength filtering Introduce trend strength indicators like ADX to filter false signals in ranging markets
- Optimize position management Dynamically adjust position size based on signal strength and market volatility
- Add stop-loss and take-profit mechanism Set dynamic stop-loss and take-profit levels based on ATR
Summary
This strategy constructs a relatively reliable trading signal generation system through the collaborative analysis of multiple classic technical indicators. The strategy design emphasizes practicality and maintainability while leaving ample room for optimization. Through reasonable parameter adjustment and implementation of optimization directions, the strategy shows promise for stable performance in actual trading.
Source Pine Script
/*backtest
start: 2024-12-10 00:00:00
end: 2025-02-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Clear Buy/Sell Signals with RSI, Bollinger Bands, IMI, and MFI", overlay=true)
// Input parameters
rsiLength = input.int(14, title="RSI Length")
bbLength = input.int(20, title="Bollinger Bands Length")
bbStdDev = input.float(2.0, title="Bollinger Bands Std Dev")
imiLength = input.int(14, title="IMI Length")
mfiLength = input.int(14, title="MFI Length")
// RSI Calculation
rsi = ta.rsi(close, rsiLength)
// Bollinger Bands Calculation
[bbUpper, bbMiddle, bbLower] = ta.bb(close, bbLength, bbStdDev)
// Intraday Momentum Index (IMI) Calculation
upSum = math.sum(close > open ? close - open : 0, imiLength)
downSum = math.sum(close < open ? open - close : 0, imiLength)
imi = (upSum / (upSum + downSum)) * 100
// Money Flow Index (MFI) Calculation
typicalPrice = (high + low + close) / 3
mfi = ta.mfi(typicalPrice, mfiLength)
// Buy/Sell Conditions
buyCondition = rsi < 30 and close < bbLower and imi < 30 and mfi < 20
sellCondition = rsi > 70 and close > bbUpper and imi > 70 and mfi > 80
// Strong Buy/Sell Conditions
strongBuyCondition = rsi < 20 and close < bbLower and imi < 20 and mfi < 10
strongSellCondition = rsi > 80 and close > bbUpper and imi > 80 and mfi > 90
// Plot Buy/Sell Signals
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", size=size.small)
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", size=size.small)
// Plot Strong Buy/Sell Signals
plotshape(series=strongBuyCondition, title="Strong Buy Signal", location=location.belowbar, color=color.lime, style=shape.labelup, text="STRONG BUY", size=size.normal)
plotshape(series=strongSellCondition, title="Strong Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="STRONG SELL", size=size.normal)
// Strategy Logic (for Backtesting)
if (buyCondition or strongBuyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition or strongSellCondition)
strategy.entry("Sell", strategy.short)Published by ianzeng123 on the FMZ strategy square · last modified 2025-02-20. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/RSI-BB-IMI-MFI-Multi-Indicator-Collaborative-Trading-Signal-Generation-Strategy-RSI-BB-IMI-MFI.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Multi Indicator Reversal Point Capture Trading StrategyPine Script · Mean reversion · 1d
- Reversal Trading Strategy with Bollinger Bands RSI ADX and ATRPine Script · Mean reversion · 1h
- Multi Indicator Trend Reversal Volatility Conditional Selective Options Selling StrategyPine Script · Mean reversion · 1h
- Advanced Momentum EMA Trend Following with RSI Overbought Oversold Trading StrategyPine Script · Mean reversion · 1d
- Dual Moving Average RSI Synergy Options Quantitative Trading StrategyPine Script · Mean reversion · 1h
- Multi Timeframe Adaptive Mean Reversion with Volume Analysis StrategyPine Script · Mean reversion · 1h