This strategy determines entry points based on trend bias on the one-hour chart, MACD crossover signals on the fifteen-minute chart, and fast volatility and gaps on the five-minute chart. By using multiple indicators across different time frames, the strategy aims to capture long-term market trends, medium-term momentum, and short-term volatility for more accurate market predictions.
The core principle of this strategy is to combine technical indicators from different time frames for a more comprehensive market analysis. Specifically:
By combining signals from these three different time frames, the strategy can better grasp the overall market trend while leveraging short-term fluctuations to optimize entry points, thereby improving trading accuracy and profit potential.
This strategy combines trend bias on the one-hour chart, MACD momentum signals on the fifteen-minute chart, and fast volatility and price gaps on the five-minute chart to construct a multi-timeframe, multi-indicator trading system. This approach enables a more comprehensive analysis of the market, capturing trends and opportunities at different levels while controlling risk. However, the strategy’s performance may be sensitive to parameter choices and may face challenges during extreme market volatility. Future considerations include introducing dynamic parameter optimization, advanced position management, and additional indicators to further enhance the strategy’s adaptability and robustness.
/*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("H1 Bias + M15 MSS + M5 FVG", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=10) // H1 Bias h1_bias = request.security(syminfo.tickerid, "60", close) h1_ma = ta.sma(h1_bias, 50) // M15 MSS [m15_macd_line, m15_macd_signal, _] = ta.macd(request.security(syminfo.tickerid, "15", close), 12, 26, 9) // M5 FVG Entry m5_volatility = ta.atr(14) // Entry conditions for long and short positions long_condition = m15_macd_line > m15_macd_signal and m5_volatility > 0.001 short_condition = m15_macd_line < m15_macd_signal and m5_volatility > 0.001 // Exit conditions exit_long_condition = m15_macd_line < m15_macd_signal exit_short_condition = m15_macd_line > m15_macd_signal // Strategy if (long_condition) strategy.entry("Long", strategy.long) if (short_condition) strategy.entry("Short", strategy.short) if (exit_long_condition) strategy.close("Long") if (exit_short_condition) strategy.close("Short") // Take-Profit and Stop-Loss settings considering leverage leverage = 10.0 // Leverage as a float tp_percentage = 15.0 // TP percentage without leverage as a float sl_percentage = 5.0 // SL percentage without leverage as a float tp_level = strategy.position_avg_price * (1.0 + (tp_percentage / 100.0 / leverage)) // TP considering leverage as a float sl_level = strategy.position_avg_price * (1.0 - (sl_percentage / 100.0 / leverage)) // SL considering leverage as a float strategy.exit("TP/SL", "Long", limit=tp_level, stop=sl_level) strategy.exit("TP/SL", "Short", limit=tp_level, stop=sl_level) // Plotting plot(h1_ma, color=color.blue, linewidth=2) plotshape(long_condition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small) plotshape(short_condition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6