资源加载中... loading...

Multi-Indicator Crossover Momentum Trend Following Strategy with Optimized Take-Profit and Stop-Loss System

Author: ChaoZhang, Date: 2024-12-05 16:21:07
Tags: SMAAOAC

img

Overview

This strategy is a comprehensive trend-following trading system that combines multiple signal confirmation mechanisms including the Alligator indicator, Awesome Oscillator (AO), and Accelerator Oscillator (AC). The system identifies market trends through multiple indicator crossovers and trend confirmations, coupled with dynamic take-profit and stop-loss mechanisms for risk management.

Strategy Principles

The core logic is based on three main components:

  1. Alligator System: Uses moving averages of different periods (13/8/5), confirming trend direction through Lips and Teeth line crossovers.
  2. Momentum Confirmation System: Combines AO and AC indicators, confirming trend strength through their positive/negative values.
  3. Risk Management System: Employs dynamic stop-loss settings based on 5-period high/low points, with a 1:2 risk-reward ratio for take-profit levels.

Multiple signal trigger conditions:

  • Long Entry: Lips crosses above Teeth + Positive AO + Positive AC
  • Short Entry: Lips crosses below Teeth + Negative AO + Negative AC

Strategy Advantages

  1. Multiple signal confirmation mechanism reduces false breakout risks.
  2. Dynamic stop-loss settings adapt to market volatility changes.
  3. Fixed risk-reward ratio aids in long-term stable profitability.
  4. Indicator combination considers both trend and momentum, improving trade accuracy.
  5. High degree of system automation reduces subjective judgment interference.

Strategy Risks

  1. Multiple indicators may lead to delayed signals, missing optimal entry points.
  2. May generate frequent false signals in ranging markets.
  3. Fixed risk-reward ratio might not suit all market conditions.
  4. Dynamic stop-loss might trigger too early in increased volatility.

Strategy Optimization Directions

  1. Introduce volatility adaptive mechanisms for dynamic risk-reward ratio adjustment.
  2. Add trend strength filters to avoid trading in weak trend environments.
  3. Develop market condition classification system for parameter optimization.
  4. Incorporate volume confirmation mechanism to improve signal reliability.
  5. Consider implementing time filters to avoid inefficient trading periods.

Summary

This strategy establishes a complete trading system through the comprehensive use of multiple technical indicators. The system emphasizes not only signal accuracy but also strict risk management for capital protection. While there are certain lag risks, the strategy shows promise for better performance through the suggested optimization directions. It is suitable for investors seeking steady returns.


/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-04 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Alligator with AO and AC Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)

// ---------------------------- Индикатор Аллигатор ----------------------------

// Параметры Аллигатора
jawLength = input.int(13, title="Jaw Length")
teethLength = input.int(8, title="Teeth Length")
lipsLength = input.int(5, title="Lips Length")

jawOffset = input.int(8, title="Jaw Offset")
teethOffset = input.int(5, title="Teeth Offset")
lipsOffset = input.int(3, title="Lips Offset")

// Расчёт скользящих средних
jawLine = ta.sma(close, jawLength)
teethLine = ta.sma(close, teethLength)
lipsLine = ta.sma(close, lipsLength)

// Сдвиг линий
jaw = jawLine[jawOffset]
teeth = teethLine[teethOffset]
lips = lipsLine[lipsOffset]

// Отображение линий Аллигатора
plot(jaw, color=color.blue, linewidth=2, title="Jaw (13,8)")
plot(teeth, color=color.red, linewidth=2, title="Teeth (8,5)")
plot(lips, color=color.green, linewidth=2, title="Lips (5,3)")

// ---------------------------- Awesome Oscillator (AO) ----------------------------

// Расчёт AO
medianPrice = (high + low) / 2
ao = ta.sma(medianPrice, 5) - ta.sma(medianPrice, 34)

// Отображение AO
hline(0, "Zero Line", color=color.gray)
plot(ao, title="Awesome Oscillator", color=(ao >= 0 ? color.green : color.red), style=plot.style_histogram, linewidth=2)

// ---------------------------- Accelerator Oscillator (AC) ----------------------------

// Расчёт AC
ac = ao - ta.sma(ao, 5)

// Отображение AC
plot(ac, title="Accelerator Oscillator", color=(ac >= 0 ? color.green : color.red), style=plot.style_histogram, linewidth=2)

// ---------------------------- Логика сигналов и управление позицией ----------------------------

// Условия для открытия длинной позиции
longCondition = ta.crossover(lips, teeth) and ao > 0 and ac > 0
if (longCondition)
    // Определение уровней stop-loss и take-profit
    stopLevel = ta.lowest(low, 5) // Минимум за последние 5 свечей
    takeProfit = close + (close - stopLevel) * 2 // Соотношение риска к прибыли 1:2

    // Открытие длинной позиции
    strategy.entry("Long", strategy.long)
    strategy.exit("Take Profit", "Long", limit=takeProfit, stop=stopLevel)

// Условия для открытия короткой позиции
shortCondition = ta.crossunder(lips, teeth) and ao < 0 and ac < 0
if (shortCondition)
    // Определение уровней stop-loss и take-profit
    stopLevelShort = ta.highest(high, 5) // Максимум за последние 5 свечей
    takeProfitShort = close - (stopLevelShort - close) * 2 // Соотношение риска к прибыли 1:2

    // Открытие короткой позиции
    strategy.entry("Short", strategy.short)
    strategy.exit("Take Profit Short", "Short", limit=takeProfitShort, stop=stopLevelShort)

// Отображение уровней на графике
plotshape(series=longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")


Related

More