
これは,SuperTrend,VWAP,EMA,およびADXの複数の技術指標を組み合わせたトレンド追跡取引戦略である.この戦略は,主にSuperTrend指標によってトレンドの方向性を認識し,VWAPとEMAの位置関係を利用してトレンドを確認し,ADX指標を使用して弱いトレンドをフィルタリングし,高精度な取引信号を提供する.この戦略は,特に5分,15分および1時間の周期で,日内取引に適しています.
戦略の核心的な論理は,以下の重要な要素に基づいています.
これは,構造が整った,論理が明確なトレンド追跡戦略である.複数の指標の配合による使用により,取引信号の信頼性が効果的に向上する.戦略の優点は,信号が明確で,実行が容易であり,優れた拡張性があることである.しかし,実用的なアプリケーションでは,市場環境の選択に注意し,リスク管理を行う必要がある.継続的な最適化と改善により,この戦略は,傾向が強い市場において安定した収益を期待する.
/*backtest
start: 2024-02-10 00:00:00
end: 2025-02-08 08:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("SuperTrend on Steroids", overlay=true)
// Input parameters
atrLength = input(10, title="ATR Period")
atrMultiplier = input(3.0, title="ATR Multiplier")
emaLength = input(21, title="EMA Length")
adxLength = input(14, title="ADX Length")
adxSmoothing = input(14, title="ADX Smoothing")
// EMA Calculation
emaValue = ta.ema(close, emaLength)
// VWAP Calculation
vwapValue = ta.vwap(close)
// ATR Calculation
atrValue = ta.atr(atrLength)
// SuperTrend Calculation
var trend = 1
up = hl2 - atrMultiplier * atrValue
dn = hl2 + atrMultiplier * atrValue
up1 = nz(up[1], up)
dn1 = nz(dn[1], dn)
up := close[1] > up1 ? math.max(up, up1) : up
dn := close[1] < dn1 ? math.min(dn, dn1) : dn
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
// ADX Calculation
[diplus, diminus, adx] = ta.dmi(adxLength, adxSmoothing)
// Buy/Sell Signals
buySignal = trend == 1 and trend[1] == -1
sellSignal = trend == -1 and trend[1] == 1
// Executing Trades
if buySignal
strategy.entry("Long", strategy.long)
if sellSignal
strategy.close("Long")
// Plotting SuperTrend Line
upPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_line, color=color.yellow, linewidth=2)
dnPlot = plot(trend == -1 ? dn : na, title="Down Trend", style=plot.style_line, color=color.red, linewidth=2)
// Buy/Sell Labels
plotshape(buySignal, title="Buy Signal", text="BUY", location=location.belowbar, style=shape.labelup, size=size.normal, color=color.green, textcolor=color.white, offset=-1)
plotshape(sellSignal, title="Sell Signal", text="SELL", location=location.abovebar, style=shape.labeldown, size=size.normal, color=color.red, textcolor=color.white, offset=1)
// Background Highlighting
fill(upPlot, dnPlot, color=trend == 1 ? color.new(color.green, 90) : color.new(color.red, 90), title="Trend Highlight")
//vwap and EMA
plot(emaValue, title="EMA", color=color.white, linewidth=2)
plot(vwapValue, title="VWAP", color=color.blue, linewidth=2)