
この戦略は、RSI (相対力指数) と CCI (収束指数) に基づいたデュアル テクニカル分析取引システムです。この 2 つの古典的なテクニカル指標の買われすぎと売られすぎのシグナルをリスク報酬比と固定ストップロスと組み合わせることで、完全な取引意思決定フレームワークを構築します。この戦略の中核は、完全なリスク管理メカニズムを組み込みながら、二重指標の相互確認を通じて取引シグナルの信頼性を向上させることです。
この戦略は、次の基本原則に基づいて実行されます。
これは、古典的なテクニカル指標と最新のリスク管理の概念を組み合わせた完全な取引システムです。デュアルテクニカル指標の確認メカニズムを通じてシグナルの信頼性が向上し、厳格なリスク管理措置と組み合わせることで、論理的に厳密かつ実用的な取引戦略が形成されます。一定の制限はあるものの、継続的な最適化と改善を通じて、この戦略は実用化の見込みが高いと考えられます。ボラティリティ認識、トレンド確認、リスク管理を継続的に最適化することで、戦略の安定性と実用性がさらに高まります。
/*backtest
start: 2024-12-29 00:00:00
end: 2025-01-05 00:00:00
period: 5m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// TradingView Pine Script for RSI & CCI-Based Strategy
//@version=6
strategy("RSI & CCI Strategy", overlay=true)
// User Inputs
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(80, title="RSI Overbought Level")
rsiOversold = input.int(20, title="RSI Oversold Level")
cciLength = input.int(20, title="CCI Length")
cciOverbought = input.int(200, title="CCI Overbought Level")
cciOversold = input.int(-200, title="CCI Oversold Level")
riskRewardRatio = input.float(2.0, title="Risk-Reward Ratio")
fixedStopLoss = input.float(1.0, title="Fixed Stop Loss (Percentage)", minval=0.1)
// RSI and CCI Calculations
rsi = ta.rsi(close, rsiLength)
cci = ta.cci(close, cciLength)
// Entry Conditions
longCondition = (rsi < rsiOversold) and (cci < cciOversold)
shortCondition = (rsi > rsiOverbought) and (cci > cciOverbought)
// Initialize variables for stop loss and take profit
var float longStopLoss = na
var float longTakeProfit = na
var float shortStopLoss = na
var float shortTakeProfit = na
// Plot Buy and Sell Signals
if (longCondition)
label.new(bar_index, low, "BUY", style=label.style_label_up, color=color.green, textcolor=color.white)
longEntryPrice = close
longStopLoss := longEntryPrice * (1 - fixedStopLoss / 100)
longTakeProfit := longEntryPrice + (longEntryPrice - longStopLoss) * riskRewardRatio
// line.new(bar_index, longEntryPrice, bar_index, longStopLoss, color=color.red, width=1, extend=extend.none)
// line.new(bar_index, longEntryPrice, bar_index, longTakeProfit, color=color.green, width=1, extend=extend.none)
if (shortCondition)
label.new(bar_index, high, "SELL", style=label.style_label_down, color=color.red, textcolor=color.white)
shortEntryPrice = close
shortStopLoss := shortEntryPrice * (1 + fixedStopLoss / 100)
shortTakeProfit := shortEntryPrice - (shortStopLoss - shortEntryPrice) * riskRewardRatio
// line.new(bar_index, shortEntryPrice, bar_index, shortStopLoss, color=color.green, width=1, extend=extend.none)
// line.new(bar_index, shortEntryPrice, bar_index, shortTakeProfit, color=color.red, width=1, extend=extend.none)
// Strategy Information and Alerts
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", from_entry="Long", limit=longTakeProfit, stop=longStopLoss)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", from_entry="Short", limit=shortTakeProfit, stop=shortStopLoss)