This strategy is a short-term trading system that combines dual EMA crossover with RSI indicator. It utilizes 9-period and 21-period Exponential Moving Averages (EMA) for trend determination, along with the Relative Strength Index (RSI) for momentum confirmation, implementing fixed stop-loss and take-profit levels for risk management. The strategy is primarily designed for 5-minute timeframe trading and is particularly effective in volatile market conditions.
The core logic is based on the synergistic effect of two technical indicators. First, trend direction is determined by the crossover of 9-period EMA and 21-period EMA, with an uptrend confirmed when the short-term EMA crosses above the long-term EMA, and a downtrend when the opposite occurs. Second, the RSI indicator is used for momentum confirmation by filtering trades based on overbought and oversold conditions. The strategy implements a 1% stop-loss and 2% take-profit, maintaining a 1:2 risk-reward ratio.
This strategy combines EMA crossover and RSI indicators to create a relatively complete short-term trading system. Its strengths lie in clear signals and controlled risk, though there is room for optimization. By incorporating dynamic stop-loss, time filtering, and other mechanisms, the strategy’s stability and profitability can be further enhanced. Overall, it represents a well-founded, logically sound trading strategy that serves as an excellent foundation for short-term trading and can be further refined and optimized.
/*backtest start: 2019-12-23 08:00:00 end: 2024-11-28 08:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("abo 3llash - EMA + RSI Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10) // Parameters emaShortLength = input.int(9, title="Short EMA Length") emaLongLength = input.int(21, title="Long EMA Length") rsiLength = input.int(14, title="RSI Length") rsiOverbought = input.int(70, title="RSI Overbought Level") rsiOversold = input.int(30, title="RSI Oversold Level") stopLossPercent = input.float(1, title="Stop Loss Percentage") / 100 takeProfitPercent = input.float(2, title="Take Profit Percentage") / 100 // Calculating EMAs and RSI emaShort = ta.ema(close, emaShortLength) emaLong = ta.ema(close, emaLongLength) rsi = ta.rsi(close, rsiLength) // Buy and Sell Conditions buyCondition = ta.crossover(emaShort, emaLong) and rsi < rsiOverbought sellCondition = ta.crossunder(emaShort, emaLong) and rsi > rsiOversold // Plotting the EMAs plot(emaShort, title="Short EMA", color=color.blue) plot(emaLong, title="Long EMA", color=color.red) // Generating buy and sell signals on the chart plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY") plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL") // Strategy Execution if (buyCondition) strategy.entry("Buy", strategy.long) // Set Stop Loss and Take Profit for Buy stopLossLevel = close * (1 - stopLossPercent) takeProfitLevel = close * (1 + takeProfitPercent) strategy.exit("Take Profit/Stop Loss", from_entry="Buy", stop=stopLossLevel, limit=takeProfitLevel) if (sellCondition) strategy.entry("Sell", strategy.short) // Set Stop Loss and Take Profit for Sell stopLossLevel = close * (1 + stopLossPercent) takeProfitLevel = close * (1 - takeProfitPercent) strategy.exit("Take Profit/Stop Loss", from_entry="Sell", stop=stopLossLevel, limit=takeProfitLevel)