
This strategy primarily utilizes the highest price, lowest price, and Exponential Moving Average (EMA) to confirm trend reversals and generate trading signals. The strategy first calculates the highest and lowest prices within a specified lookback period, then determines whether the current closing price is below the lowest price corresponding to the highest price (bearish reversal confirmation) or above the highest price corresponding to the lowest price (bullish reversal confirmation). Once a reversal confirmation signal appears, the strategy generates a corresponding entry signal. The main advantage of this strategy is its ability to capture trend reversal opportunities, while the main risk is that after a reversal confirmation signal appears, prices may experience repeated fluctuations rather than a unidirectional trend.
The Multi-Timeframe Reversal Confirmation Trading Strategy identifies potential trend reversal opportunities using the highest price, lowest price, and EMA, generating corresponding entry signals. The strategy’s advantage is its ability to capture trend reversals, but it also faces issues of frequent trading and insufficient risk control. By introducing stop-loss and take-profit mechanisms, combining other indicators, parameter optimization, and position sizing, the strategy’s performance and stability can be further improved. In practical applications, strategy parameters and risk control measures need to be adjusted according to specific trading instruments and market environments.
/*backtest
start: 2023-05-05 00:00:00
end: 2024-05-10 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Reversal Confimation Strategy", overlay=true)
// Indicator inputs
lookback = input.int(50, 'Lookback Period', minval=1, step=1)
downColor = input(color.red, 'Shape Color Down')
upColor = input(color.green, 'Shape Color Up')
// Indicator calculations
find_highest = ta.highest(high, lookback)
find_lowest = ta.lowest(low, lookback)
ema = ta.ema(close, lookback)
var dnRv = 0.0
var dnRv_trigger = false
var upRv = 0.0
var upRv_trigger = false
if high == find_highest
dnRv_trigger := false
if low == find_lowest
upRv_trigger := false
for i = 0 to lookback - 1
if high[i] == find_highest
dnRv := low[i]
for i = 0 to lookback - 1
if low[i] == find_lowest
upRv := high[i]
dnRv_signal = close < dnRv and dnRv_trigger == false
upRv_signal = close > upRv and upRv_trigger == false
if dnRv_signal
dnRv_trigger := true
if upRv_signal
upRv_trigger := true
// Entry and exit conditions
if dnRv_signal
strategy.entry("Sell", strategy.short)
if upRv_signal
strategy.entry("Buy", strategy.long)
// Plotting
plotshape(dnRv_signal ? 1 : 0, style=shape.triangledown, location=location.abovebar, color=downColor, size=size.small)
plotshape(upRv_signal ? 1 : 0, style=shape.triangleup, location=location.belowbar, color=upColor, size=size.small)