本策略基于相对强弱指数(RSI)和平均真实波动幅度(ATR)通道,适用于5分钟和15分钟时间周期,属于超级scalping类型策略。策略通过RSI指标判断长短方向进入点,并利用ATR通道设置止损和止盈,实现高频交易。
本策略属于高频scalping交易类型,通过RSI指标和ATR通道设定入场出场点,实现快速交易。优点是获利快,风险控制到位,适合逢高短轻的操作。但需要密切盯盘,而且需要足够的资金支持频繁交易。整体来说,该策略顺势操作效果好,可通过进一步优化来提升盈利能力。
/*backtest
start: 2023-11-20 00:00:00
end: 2023-11-27 00:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Super Scalper - 5 Min 15 Min", overlay=true)
// Create Indicator's
shortSMA = ema(close, 21)
longSMA = ema(close, 65)
rsi = rsi(close, 14)
atr = atr(14)
// Specify conditions
longCondition = open < close-atr
shortCondition = open > atr+close
GoldenLong = crossover(shortSMA,longSMA)
Goldenshort = crossover(longSMA,shortSMA)
plotshape(shortCondition, title="Sell Label", text="Sell", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.red, textcolor=color.white, transp=0)
plotshape(longCondition, title="Buy Label", text="Buy", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
plotshape(Goldenshort, title="Golden Sell Label", text="Golden Crossover Short", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.blue, textcolor=color.white, transp=0)
plotshape(GoldenLong, title="Golden Buy Label", text="Golden Crossover Long", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.yellow, textcolor=color.white, transp=0)
// Execute trade if condition is True
if (longCondition)
stopLoss = low - atr * 2
takeProfit = high + atr * 5
strategy.entry("long", strategy.long, 1, when = rsi > 50)
if (shortCondition)
stopLoss = high + atr * 2
takeProfit = low - atr * 5
strategy.entry("short", strategy.short, 1, when = rsi < 50)
// Plot ATR bands to chart
plot(atr+close)
plot(close-atr)
// Plot Moving Averages
plot(shortSMA, color = color.red)
plot(longSMA, color = color.yellow)