本策略结合双移动均线和相对强弱指标RSI,寻找价格在强势趋势中的短期反转机会进行交易。在趋势方向明确时,利用RSI识别超买超卖情况,等待价格反转进入场内。该策略适用于趋势较明显的市场,能够在不逆势的前提下捕捉部分反转 movement。
计算30日简单移动均线SMA和200日指数移动均线EMA,判断大趋势方向
计算30日RSI,判断超买超卖
进入规则:
出场规则:
追踪大趋势,避免逆势操作
RSI参数设置较为保守,可以减少虚假信号
结合双移动均线过滤,entry timing比较准确
风险可控,回撤不大
需要较明显趋势市场,震荡行情效果不佳
RSI参数设置保守,可能错过部分机会
止损位置需要合理设置,避免过于激进退出
优化RSI参数,适当降低参数寻找更多entry机会
测试不同的移动均线组合
设置趋势过滤,只在趋势足够明显时操作
优化止损策略,严格控制单笔止损
本策略整体风险可控,适合中长线持仓交易者。策略根据大趋势方向交易,采用保守RSI参数以及严格的移动均线过滤,可以有效避免假突破,从而提高胜率。同时也存在一定潜在改进空间,如果参数调整得当,可以获得更多机会。需要注意风险控制,保持长线的交易心态。
/*backtest
start: 2023-09-17 00:00:00
end: 2023-10-17 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
//Based on Larry Connors RSI-2 Strategy - Lower RSI
strategy(title="_CM_RSI_2_Strat_Low", shorttitle="_CM_RSI_2_Strategy_Lower", overlay=false)
src = close,
//RSI CODE
up = rma(max(change(src), 0), 30)
down = rma(-min(change(src), 0), 30)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//Criteria for Moving Avg rules
ma50= vwma(close,30)
ma200= vwma(close,200)
//Rule for RSI Color
col = ma50 > ma200 and rsi <=53?lime: ma50 < ma200 and rsi >= 60?red : silver
long = ma50 > ma200 and rsi <= 53
short = ma50 < ma200 and rsi >= 60
//plot(rsi, title="RSI", style=line, linewidth=1,color=col)
//plot(100, title="Upper Line 100",style=line, linewidth=3, color=aqua)
//plot(0, title="Lower Line 0",style=line, linewidth=3, color=aqua)
//band1 = plot(60, title="Upper Line 60",style=line, linewidth=1, color=aqua)
//band0 = plot(44, title="Lower Line 40",style=line, linewidth=1, color=aqua)
//fill(band1, band0, color=silver, transp=90)
strategy.entry ("buy", strategy.long, when=long)
strategy.entry ("sell", strategy.short, when=short)
plot(long,"long",color=green,linewidth=1)
plot(short,"short",color=red,linewidth=1)