0bps

Strategy vault / Scalping

Superscaling Strategy Based on RSI and ATR Channels

This strategy is based on Relative Strength Index (RSI) and Average True Range (ATR) channel, suitable for 5-min and 15-min timeframes, belonging to super scalping strategy type. It determines long/short direction…

Author
ChaoZhang
Complexity
Starter · 47 lines
Parameters
0
Backtest bar
30m · intraday
Tested on
BTC/USDT · futures

IMG

Super Scalping Strategy Based on RSI and ATR Channel

Overview

This strategy is based on Relative Strength Index (RSI) and Average True Range (ATR) channel, suitable for 5-min and 15-min timeframes, belonging to super scalping strategy type. It determines long/short direction entry points through RSI indicator and utilizes ATR channel to set stop loss and take profit, realizing high frequency trading.

Strategy Principle

  1. Use 21-day Exponential Moving Average (EMA) and 65-day EMA to form golden cross and dead cross, judging the major trend direction.
  2. When RSI is below 50, it is bearish; when above 50, it is bullish, sending out buy and sell signals.
  3. The upper and lower bands of ATR channel are: close+ATR and close-ATR. Sell when close breaks through the upper band of ATR and buy when it breaks through the lower band.
  4. Set stop loss at 2 times ATR and take profit at 5 times ATR.

Advantage Analysis

  1. Using golden cross and dead cross to determine major trend, avoiding trading against the trend.
  2. RSI can identify better entry timing.
  3. ATR channel sets stop loss and take profit points effectively, greatly improving profit-loss ratio.
  4. Suitable for high frequency scalping trading with quick profits.

Risk Analysis

  1. Need to watch the market closely, otherwise missing entry or stop loss points may lead to huge loss.
  2. In trending market, multiple add-on positions may occur, needing good control of position sizing.
  3. Enough capital is required to support frequent trading.

Optimization Direction

  1. Optimize ATR parameters for more reasonable stop loss and take profit.
  2. Add other indicator filters to improve entry quality.
  3. Add auto stop loss and take profit functions.
  4. Include capital management and position sizing control modules.

Summary

This strategy belongs to high frequency scalping trading type. It sets entry and exit points through RSI indicator and ATR channel for quick trades. The advantages are quick profit with good risk control, suitable for trading along the trend. However, close market watch is needed with enough capital supporting frequent trades. Overall speaking, this strategy performs well for trend trading and could be further improved on profitability through optimization.

Source Pine Script

/*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)

Published by ChaoZhang on the FMZ strategy square · last modified 2023-11-28. 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.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Superscaling-Strategy-Based-on-RSI-and-ATR-Channels.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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

esc

Try , , or .

↑↓ move↵ open