
この戦略は,複数の技術指標の組み合わせに基づいた取引システムであり,CCI,RSI,ランダムな指標 (((Stochastic) とMFIなどの4つの主要な指標を統合し,指数平滑処理と組み合わせて,総合的な市場分析の枠組みを構築しています.
戦略の核心は,複数の指標を融合させることで,より信頼性の高い取引シグナルを提供することです.まずは,各指標の標準化処理とWMAの平滑化が行われ,IFT変換によって指標の値をマッピングします.[-1,1] 区 〇 具体的には:
この戦略は,多指標融合と信号最適化により,比較的完全な取引システムを構築している.この戦略の優位性は,信号の信頼性とリスク制御の整合性にあるが,現実の応用では,市場の特徴に応じてパラメータの最適化が必要である.提案された最適化方向によって,戦略は,異なる市場環境でより良いパフォーマンスを期待している.
/*backtest
start: 2024-11-19 00:00:00
end: 2024-12-18 08:00:00
period: 4h
basePeriod: 4h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy('wombocombo', overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// IFTCOMBO Hesaplamaları
ccilength = input.int(5, 'CCI Length')
wmalength = input.int(9, 'Smoothing Length')
rsilength = input.int(5, 'RSI Length')
stochlength = input.int(5, 'STOCH Length')
mfilength = input.int(5, 'MFI Length')
// CCI
v11 = 0.1 * (ta.cci(close, ccilength) / 4)
v21 = ta.wma(v11, wmalength)
INV1 = (math.exp(2 * v21) - 1) / (math.exp(2 * v21) + 1)
// RSI
v12 = 0.1 * (ta.rsi(close, rsilength) - 50)
v22 = ta.wma(v12, wmalength)
INV2 = (math.exp(2 * v22) - 1) / (math.exp(2 * v22) + 1)
// Stochastic
v1 = 0.1 * (ta.stoch(close, high, low, stochlength) - 50)
v2 = ta.wma(v1, wmalength)
INVLine = (math.exp(2 * v2) - 1) / (math.exp(2 * v2) + 1)
// MFI
source = hlc3
up = math.sum(volume * (ta.change(source) <= 0 ? 0 : source), mfilength)
lo = math.sum(volume * (ta.change(source) >= 0 ? 0 : source), mfilength)
mfi = 100.0 - 100.0 / (1.0 + up / lo)
v13 = 0.1 * (mfi - 50)
v23 = ta.wma(v13, wmalength)
INV3 = (math.exp(2 * v23) - 1) / (math.exp(2 * v23) + 1)
// Ortalama IFTCOMBO değeri
AVINV = (INV1 + INV2 + INVLine + INV3) / 4
// Sinyal çizgileri
hline(0.5, color=color.red, linestyle=hline.style_dashed)
hline(-0.5, color=color.green, linestyle=hline.style_dashed)
// IFTCOMBO çizgisi
plot(AVINV, color=color.red, linewidth=2, title='IFTCOMBO')
// Long Trading Sinyalleri
longCondition = ta.crossover(AVINV, -0.5)
longCloseCondition = ta.crossunder(AVINV, 0.5)
// Short Trading Sinyalleri
shortCondition = ta.crossunder(AVINV, 0.5)
shortCloseCondition = ta.crossover(AVINV, -0.5)
// Stop-loss seviyesi (%0.5 kayıp)
stopLoss = strategy.position_avg_price * (1 - 0.005) // Long için
takeProfit = strategy.position_avg_price * (1 + 0.01) // Long için
// Long Strateji Kuralları
if longCondition
strategy.entry('Long', strategy.long)
strategy.exit('Long Exit', 'Long', stop=stopLoss, limit=takeProfit) // Stop-loss eklendi
if longCloseCondition
strategy.close('Long')
// Stop-loss seviyesi (%0.5 kayıp)
stopLossShort = strategy.position_avg_price * (1 + 0.005) // Short için
takeProfitShort = strategy.position_avg_price * (1 - 0.01) // Short için
// Short Strateji Kuralları
if shortCondition
strategy.entry('Short', strategy.short)
strategy.exit('Short Exit', 'Short', stop=stopLossShort, limit=takeProfitShort) // Stop-loss eklendi
if shortCloseCondition
strategy.close('Short')
// Sinyal noktalarını plotlama
plotshape(longCondition, title='Long Signal', location=location.belowbar, color=color.purple, size=size.small)
plotshape(shortCondition, title='Short Signal', location=location.abovebar, color=color.yellow, size=size.small)