Strategi ini adalah strategi pembelian/penjualan yang didasarkan pada TD Sequential. Strategi ini mengidentifikasi titik-titik pembalikan tren potensial dengan mengenali lilin ke-8 dan ke-9 dalam urutan TD. Selain itu, strategi ini mempertimbangkan retracement setelah break-out urutan TD untuk meningkatkan akurasi titik masuk.
Dengan menggabungkan urutan TD dan rata-rata bergerak, strategi ini dapat secara efektif mengidentifikasi titik pembalikan tren potensial dan meningkatkan keakuratan titik masuk dengan mempertimbangkan situasi retracement. Meskipun strategi ini memiliki beberapa risiko dan keterbatasan, strategi ini dapat ditingkatkan lebih lanjut dalam hal ketahanan dan profitabilitas dengan memperkenalkan lebih banyak indikator teknis, mengoptimalkan metode penentuan tren, dan menetapkan mekanisme stop-loss yang jelas.
/*backtest start: 2023-03-26 00:00:00 end: 2024-03-31 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=4 strategy("Dipak Shankarrao Chavhan", shorttitle="Dipak Chavhan", overlay=true, pyramiding=0, default_qty_value=10) Numbers = input(true) SR = input(true) var int TD = 0 var int TS = 0 var int TDUp = 0 var int TDDn = 0 TD := close > close[4] ? TD[1] + 1 : 0 TS := close < close[4] ? TS[1] + 1 : 0 TDUp := TD - valuewhen(TD < TD[1], TD, 1) TDDn := TS - valuewhen(TS < TS[1], TS, 1) plotshape(Numbers ? (TDUp == 8 ? true : na) : na, style=shape.triangleup, text="8", color=color.new(color.green, 0), location=location.belowbar) plotshape(Numbers ? (TDUp == 9 ? true : na) : na, style=shape.triangleup, text="9", color=color.new(color.green, 0), location=location.belowbar) plotshape(Numbers ? (TDDn == 8 ? true : na) : na, style=shape.triangledown, text="8", color=color.new(color.red, 0), location=location.abovebar) plotshape(Numbers ? (TDDn == 9 ? true : na) : na, style=shape.triangledown, text="9", color=color.new(color.red, 0), location=location.abovebar) priceflip = barssince(close < close[4]) sellsetup = close > close[4] and priceflip sell = sellsetup and barssince(priceflip != 9) sellovershoot = sellsetup and barssince(priceflip != 13) sellovershoot1 = sellsetup and barssince(priceflip != 14) sellovershoot2 = sellsetup and barssince(priceflip != 15) sellovershoot3 = sellsetup and barssince(priceflip != 16) priceflip1 = barssince(close > close[4]) buysetup = close < close[4] and priceflip1 buy = buysetup and barssince(priceflip1 != 9) buyovershoot = buysetup and barssince(priceflip1 != 13) buyovershoot1 = buysetup and barssince(priceflip1 != 14) buyovershoot2 = buysetup and barssince(priceflip1 != 15) buyovershoot3 = buysetup and barssince(priceflip1 != 16) TDbuyh = valuewhen(buy, high, 0) TDbuyl = valuewhen(buy, low, 0) TDsellh = valuewhen(sell, high, 0) TDselll = valuewhen(sell, low, 0) plot(SR ? (TDbuyh ? TDbuyl : na) : na, style=plot.style_circles, linewidth=2, color=color.red) plot(SR ? (TDselll ? TDsellh : na) : na, style=plot.style_circles, linewidth=2, color=color.lime) sma1 = sma(close, 10) sma2 = sma(close, 20) if TDbuyh strategy.entry("Enter Long", strategy.long) else if TDselll strategy.entry("Enter Short", strategy.short)