Strategy vault / Mean reversion
Multi Indicator Bitcoin Daily Trading Strategy
This strategy combines multiple indicators to identify trading opportunities within the daily time frame for Bitcoin. It mainly uses indicators like MACD, RSI, Stoch RSI, together with the direction of moving average…

Overview
This strategy combines multiple indicators to identify trading opportunities within the daily time frame for Bitcoin. It mainly uses indicators like MACD, RSI, Stoch RSI, together with the direction of moving average to determine the current trend direction for generating buy and sell signals.
Strategy Logic
The strategy utilizes the following key indicators:
MACD (Fast MA - Slow MA) and its signal line. MACD crossing above signal line gives buy signal, and crossing below 0 gives sell signal.
RSI (Relative Strength Index). RSI crossing above a threshold gives buy signal.
Stoch RSI. Stoch RSI shows overbought/oversold levels of RSI. Stoch RSI below threshold gives buy signal, while above threshold gives sell signal.
Moving average direction. Close price crossing below MA gives sell signal.
According to these indicators, the trading signals are:
Buy Signal: When (Stoch RSI < Threshold) AND (MACD crossing above threshold OR RSI crossing above threshold)
Sell Signal: When (MACD crossing below 0) AND (Close below MA OR Stoch RSI > Threshold)
Using multiple indicators together can better determine the current trend direction and identify trend reversal points for entering trades.
Advantages
Combining multiple indicators improves accuracy and avoids false signals from a single indicator.
MACD shows trend direction and strength. RSI reflects overbought/oversold levels. Stoch RSI determines overbought/oversold of RSI. MA shows trend direction. These indicators verify each other.
The buy/sell signals require a combination of multiple indicators, filtering out some false signals and avoiding unnecessary trades.
Backtest starts from 2017/1/1, covering the huge bull run of Bitcoin at 2017 year end. Tests strategy performance in a real bull market.
Stop loss is set to control loss in single trades.
Risks
Although using multiple indicators improves accuracy, discrepancy between them can still lead to some wrong signals.
The optimized stop loss level may need adjustments for different market situations. Stop loss too wide increases loss in single trades, while too tight may get stopped out prematurely.
Daily timeframe prevents detailed operations in shorter time ranges. Unable to respond to sudden short-term big moves.
Strategy is only backtested on limited historical data. Overfit risk exists. Requires further testing across longer timeframe and more markets.
Enhancement Opportunities
Test more indicator combinations to find optimal multi-indicator strategies.
Optimize parameters of the indicators for better values.
Test different stop loss levels to find optimal risk/reward ratio.
Conduct backtests across longer historical data to avoid overfitting.
Explore applying strategy logic in higher frequency timeframes for more frequent trading.
Conclusion
This strategy combines MACD, RSI, Stoch RSI and other indicators to determine the bitcoin daily trend direction and identify trend reversals for trade entry. Stop loss is set to control trade risk. Backtest shows positive results but still requires further verification across longer timeframe and more markets to avoid overfit risks. Further optimizations on indicator parameters and stop loss/take profit levels can improve results. The strategy provides an initial idea of multi-indicator combination approach which is worth deeper exploration and enhancement.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 2017 | Backtest Start Year |
| v_input_2 | true | Backtest Start Month |
| v_input_3 | true | Backtest Start Day |
| v_input_4 | 2019 | Backtest Stop Year |
| v_input_5 | 12 | Backtest Stop Month |
| v_input_6 | 31 | Backtest Stop Day |
| v_input_7 | 30 | rsi_threshold |
| v_input_8 | 4 | rsi_length |
| v_input_9 | 8 | srsi_length |
| v_input_10 | 4 | srsi_smooth |
| v_input_11 | 57 | srsi_sell_threshold |
| v_input_12 | 14 | length |
| v_input_13 | -1 | dma_signal_threshold |
| v_input_14 | 11 | fastLength |
| v_input_15 | 18 | slowlength |
| v_input_16 | 6 | MACDLength |
| v_input_17 | -2 | MACD_signal_threshold |
| v_input_18 | 5 | short_loss_tol |
| v_input_19 | 5 | long_loss_tol |
Source Pine Script
/*backtest
start: 2022-10-23 00:00:00
end: 2023-10-29 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
// Original code is from CredibleHulk and modified by bennef
strategy("BTC Daily Strategy BF", overlay=false, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.075)
/////////////// Time Frame ///////////////
testStartYear = input(2017, "Backtest Start Year")
testStartMonth = input(1, "Backtest Start Month")
testStartDay = input(1, "Backtest Start Day")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay, 0, 0)
testStopYear = input(2019, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(31, "Backtest Stop Day")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay, 0, 0)
testPeriod() => true
/////////////// Input Params ///////////////
rsi_threshold = input(30)
rsi_length = input(4)
srsi_length = input(8)
srsi_smooth = input(4)
srsi_sell_threshold = input(57)
length = input(14)
dma_signal_threshold = input(-1)
fastLength = input(11)
slowlength = input(18)
MACDLength = input(6)
MACD_signal_threshold = input(-2)
short_loss_tol = input(5)
long_loss_tol = input(5)
stop_level_long = strategy.position_avg_price * (1 - long_loss_tol / 100.0)
stop_level_short = strategy.position_avg_price * (1 + short_loss_tol / 100.0)
/////////////// Signal generation ///////////////
// MACD
MACD = ema(close, fastLength) - ema(close, slowlength)
aMACD = ema(MACD, MACDLength)
delta = MACD - aMACD
// RSI and Stochastic RSI
rs = rsi(close, rsi_length)
k = sma(stoch(rs, rs, rs, srsi_length), srsi_smooth)
// SMA
norm = sma(ohlc4, length)
threshold = close - norm
/////////////// Strategy ///////////////
long = ((crossover(delta, MACD_signal_threshold) or crossover(rs, rsi_threshold)) and k < srsi_sell_threshold)
short = (crossunder(delta, 0) or (crossunder(threshold, dma_signal_threshold) and k > srsi_sell_threshold))
if testPeriod()
strategy.entry("L", strategy.long, when = long)
strategy.entry("S", strategy.short, when = short)
strategy.exit("stop loss L", from_entry = "L", stop = stop_level_long)
strategy.exit("stop loss S", from_entry = "S", stop = stop_level_short)
/////////////// Plotting ///////////////
// MACD
plot(delta, color = delta > MACD_signal_threshold ? color.lime : delta < 0 ? color.red : color.yellow)
MACD_signal_threshold_line = hline(MACD_signal_threshold, color = color.yellow, title = "MACD Signal Threshold")
// RSI
plot(rs, color = rs > rsi_threshold ? color.lime : color.fuchsia)
rsi_threshold_line = hline(rsi_threshold, color = color.fuchsia, title = "RSI Threshold")
// Stochastic RSI
plot(k, color = k > srsi_sell_threshold ? color.lime : color.red)
srsi_sell_threshold_line = hline(srsi_sell_threshold, color = color.white, title = "Stoch RSI Threshold")
// SMA
plot(threshold / 100, color = threshold < dma_signal_threshold ? color.red : color.blue)
dma_signal_threshold_line = hline (dma_signal_threshold, color = color.blue, title = "DMA Signal Threshold")
bgcolor(long ? color.lime : short ? color.red : na, transp=50)Published by ChaoZhang on the FMZ strategy square · last modified 2023-10-30. 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/Multi-Indicator-Bitcoin-Daily-Trading-Strategy.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
- Advanced 15 Minute Chart Trading Signal StrategyPine Script · Mean reversion · 3h
- Dynamic Adaptive Multi Timeframe Trend Following and Range Reversal Hybrid StrategyPine Script · Mean reversion · 2d
- Market Cypher Wave B Automated Trading StrategyPine Script · Mean reversion · 1h
- Multi Indicator Trend Reversal Trading StrategyPine Script · Mean reversion · 1h
- Multi Indicator Weighted Smart Trading StrategyPine Script · Mean reversion · 2d
- Intraday Single Candle Indicator Combo Short Term Trading StrategyPine Script · Mean reversion · 1d