This strategy is a quantitative trading system based on the synergistic effect of the Relative Strength Index (RSI) and Awesome Oscillator (AO). It identifies potential long opportunities by capturing signals when RSI crosses above 50 while AO is in negative territory. The strategy employs percentage-based take profit and stop loss mechanisms for risk management, using 10% of account equity for each trade.
The core logic relies on the cooperation of two technical indicators: 1. RSI Indicator: Uses 14-period RSI to monitor price momentum, with crossover above 50 indicating established upward momentum. 2. AO Indicator: Calculates price momentum by comparing 5-period and 34-period moving averages, with negative values indicating oversold market conditions. 3. Entry Conditions: Long positions are opened when RSI crosses above 50 and AO is negative, capturing potential reversals in oversold areas. 4. Exit Conditions: Implements 2% take profit and 1% stop loss settings to maintain reasonable risk-reward ratios.
This trend-following strategy combines RSI and AO indicators to capture long opportunities during oversold reversals. While well-designed with proper risk management, thereโs room for optimization. Traders should conduct thorough backtesting before live implementation and adjust parameters according to market conditions. The strategy is suitable for traders with higher risk tolerance and good understanding of technical analysis.
/*backtest start: 2024-10-01 00:00:00 end: 2024-10-31 23:59:59 period: 1h basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy(title="๐ BUY Only - RSI Crossing 50 + AO Negative", shorttitle="๐ AO<0 RSI+50 Strategy", overlay=true) // ----------------------------- // --- User Inputs --- // ----------------------------- // RSI Settings rsiPeriod = input.int(title="RSI Period", defval=14, minval=1) // AO Settings aoShortPeriod = input.int(title="AO Short Period", defval=5, minval=1) aoLongPeriod = input.int(title="AO Long Period", defval=34, minval=1) // Strategy Settings takeProfitPerc = input.float(title="Take Profit (%)", defval=2.0, minval=0.0, step=0.1) stopLossPerc = input.float(title="Stop Loss (%)", defval=1.0, minval=0.0, step=0.1) // ----------------------------- // --- Awesome Oscillator (AO) Calculation --- // ----------------------------- // Calculate the Awesome Oscillator ao = ta.sma(hl2, aoShortPeriod) - ta.sma(hl2, aoLongPeriod) // Detect AO Crossing Zero aoCrossOverZero = ta.crossover(ao, 0) aoCrossUnderZero = ta.crossunder(ao, 0) // ----------------------------- // --- Relative Strength Index (RSI) Calculation --- // ----------------------------- // Calculate RSI rsiValue = ta.rsi(close, rsiPeriod) // Detect RSI Crossing 50 rsiCrossOver50 = ta.crossover(rsiValue, 50) rsiCrossUnder50 = ta.crossunder(rsiValue, 50) // ----------------------------- // --- Plotting Arrows and Labels --- // ----------------------------- // Plot AO Cross Over Arrow (AO+) plotshape(series=aoCrossOverZero, location=location.belowbar, color=color.green, style=shape.labelup, title="AO Crosses Above Zero", text="AO+", textcolor=color.white, size=size.small) // Plot AO Cross Under Arrow (AO-) plotshape(series=aoCrossUnderZero, location=location.abovebar, color=color.red, style=shape.labeldown, title="AO Crosses Below Zero", text="AO-", textcolor=color.white, size=size.small) // Plot RSI Cross Over Arrow (RSI Up) plotshape(series=rsiCrossOver50, location=location.belowbar, color=color.blue, style=shape.labelup, title="RSI Crosses Above 50", text="RSI Up", textcolor=color.white, size=size.small) // Plot RSI Cross Under Arrow (RSI Down) plotshape(series=rsiCrossUnder50, location=location.abovebar, color=color.orange, style=shape.labeldown, title="RSI Crosses Below 50", text="RSI Down", textcolor=color.white, size=size.small) // ----------------------------- // --- Buy Signal Condition --- // ----------------------------- // Define Buy Signal: AO is negative and previous bar's RSI > 50 buySignal = (ao < 0) and (rsiValue[1] > 50) // Plot Buy Signal plotshape(series=buySignal, location=location.belowbar, color=color.lime, style=shape.triangleup, title="Buy Signal", text="BUY", textcolor=color.black, size=size.small) // ----------------------------- // --- Strategy Execution --- // ----------------------------- // Entry Condition if buySignal strategy.entry("Long", strategy.long) // Exit Conditions // Calculate Stop Loss and Take Profit Prices if strategy.position_size > 0 // Entry price entryPrice = strategy.position_avg_price // Stop Loss and Take Profit Levels stopLevel = entryPrice * (1 - stopLossPerc / 100) takeProfitLevel = entryPrice * (1 + takeProfitPerc / 100) // Submit Stop Loss and Take Profit Orders strategy.exit("Exit Long", from_entry="Long", stop=stopLevel, limit=takeProfitLevel)