この戦略は、主に指数移動平均 (EMA)、スーパートレンド、ボリンジャーバンド、相対力指数 (RSI) の包括的な分析に基づいて、複数の指標を組み合わせた複合取引システムです。この戦略のコアロジックは、EMA とスーパートレンドを中心に取引シグナルを構築し、ボリンジャーバンドと RSI を組み合わせて市場のボラティリティとモメンタムの補助的な判断を提供します。取引システムは、日次、週次、月次を含む複数期間の RSI 分析を使用して、取引の決定にさらに包括的な市場の視点を提供します。
この戦略では、多層テクニカル指標の組み合わせを使用して、市場のトレンドとボラティリティの機会を捉えます。
取引シグナルの発動条件:
この戦略は、複数のテクニカル指標を有機的に組み合わせることで、比較的完全な取引システムを構築します。 EMA とスーパートレンドの組み合わせにより主要な取引シグナルが提供され、ADX スクリーニングにより強いトレンド環境で取引が行われることが保証され、ボリンジャー バンドと RSI の補助分析により追加の市場展望が提供されます。この戦略の主な利点は、信号の信頼性とシステムの整合性ですが、信号の遅延とパラメータの最適化という課題にも直面しています。提案された最適化の方向性を通じて、この戦略は安定性を維持しながら収益性を向上させることが期待されます。
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-04 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//made by Chinmay
//@version=6
strategy("CJ - Multi1", overlay=true)
// Input for RSI length
rsi_length = input.int(14, title="RSI Length")
// Calculate Daily RSI
daily_rsi = ta.rsi(close, rsi_length)
// Calculate Weekly RSI (using security function to get weekly data)
weekly_rsi = request.security(syminfo.tickerid, "W", ta.rsi(close, rsi_length))
// Calculate Monthly RSI (using security function to get weekly data)
monthly_rsi = request.security(syminfo.tickerid, "M", ta.rsi(close, rsi_length))
// Plot the RSIs
plot(daily_rsi, color=color.blue, title="Daily RSI", linewidth=2)
plot(weekly_rsi, color=color.red, title="Weekly RSI", linewidth=2)
plot(monthly_rsi, color=color.black, title="Monthly RSI", linewidth=2)
// Create horizontal lines at 30, 50, and 70 for RSI reference
hline(30, "Oversold", color=color.green)
hline(70, "Overbought", color=color.red)
hline(50, "Neutral", color=color.gray)
// Bollinger Bands Calculation
bb_length = 20
bb_mult = 2
bb_stddev = ta.stdev(close, bb_length)
bb_average = ta.sma(close, bb_length)
bb_upper = bb_average + bb_mult * bb_stddev
bb_lower = bb_average - bb_mult * bb_stddev
plot(bb_upper, color=color.new(#ffb13b, 0), linewidth=2)
plot(bb_average, color=color.new(#b43bff, 0), linewidth=2)
plot(bb_lower, color=color.new(#ffb13b, 0), linewidth=2)
// Inputs for EMA
ema_L1 = input.int(defval=13, title="EMA Length 1")
ema_L2 = input.int(defval=34, title="EMA Length 2")
ema_L3 = input.int(defval=100, title="EMA Length 3")
adx_level = input.int(defval=25, title="ADX Level")
// Inputs for Supertrend
atr_l = input.int(defval=10, title="ATR Length")
factor = input.float(defval=3.0, title="Supertrend Multiplier")
// Calculate EMA
ema1 = ta.ema(close, ema_L1)
ema2 = ta.ema(close, ema_L2)
ema3 = ta.ema(close, ema_L3)
// Calculate Supertrend
[supertrend, direction] = ta.supertrend(factor, atr_l)
// Calculate ADX and DI
[diplus, diminus, adx] = ta.dmi(14,14)
// Buy and Sell Conditions
buy = direction == -1 and ema1 > ema2 and close > ta.ema(close, 100) and adx > adx_level
short = direction == -1 and ema1 < ema2 and close < ta.ema(close, 100) and adx > adx_level
sell = ta.crossunder(close, supertrend)
cover = ta.crossover(close, supertrend)
// Strategy Logic
if buy
strategy.entry("Buy", strategy.long, comment="Long Entry")
if sell
strategy.close("Buy", comment="Sell Exit")
// Uncomment for Short Strategy
if short
strategy.entry("Short", strategy.short, comment="Short Entry")
if cover
strategy.close("Short", comment="Cover Exit")