The DCA Dual Moving Average Turtle Trading Strategy is a quantitative trading strategy based on the crossover of two moving averages and Dollar Cost Averaging (DCA). The strategy uses two Simple Moving Averages (SMAs) with different periods as buy and sell signals. When the fast SMA crosses above the slow SMA, a buy signal is generated, and when the fast SMA crosses below the slow SMA, a sell signal is generated. The strategy aims to capture medium to long-term market trends while reducing risks associated with market volatility through the use of DCA.
The DCA Dual Moving Average Turtle Trading Strategy captures market trends through dual moving average crossovers and reduces buying costs and risks using the DCA method. The strategy is simple, widely applicable, but requires attention to parameter optimization and risk control in practical applications. By introducing other technical indicators, optimizing DCA parameters, and incorporating stop-loss and take-profit mechanisms, the strategy’s performance and stability can be further enhanced.
/*backtest start: 2024-04-21 00:00:00 end: 2024-04-28 00:00:00 period: 10m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © loggolitasarim //@version=5 strategy("DCA YSMA HSMA Stratejisi", overlay=true, calc_on_every_tick=true) // Parametreler sma_fast = input(14, "Hızlı SMA Dönemi") sma_slow = input(28, "Yavaş SMA Dönemi") dca_amount = input(100, "DCA Miktarı") dca_interval = input(14, "DCA Aralığı (Gün)") // Hızlı ve yavaş SMA hesaplamaları fast_sma = ta.sma(close, sma_fast) slow_sma = ta.sma(close, sma_slow) // DCA hesaplamaları var float dca_average_price = na var int dca_count = na if (bar_index % dca_interval == 0) dca_count := nz(dca_count, 0) + 1 dca_average_price := nz(dca_average_price, close) * (dca_count - 1) + close dca_average_price /= dca_count // Alım ve satım sinyalleri longCondition = ta.crossover(fast_sma, slow_sma) shortCondition = ta.crossunder(fast_sma, slow_sma) if (longCondition) strategy.entry("Alım", strategy.long, qty=dca_amount) if (shortCondition) strategy.entry("Satım", strategy.short) // Grafik plot(fast_sma, "Hızlı SMA", color=color.blue) plot(slow_sma, "Yavaş SMA", color=color.red) // Uyarılar alertcondition(longCondition, "Alım Sinyali", "Alım Sinyali") alertcondition(shortCondition, "Satım Sinyali", "Satım Sinyali")