
この戦略は,複数の技術指標の協同分析に基づく取引信号生成システムである.戦略は,相対的な強弱指数 (RSI),ブリン帯 (BB),日内動量指数 (IMI) および資金流動指数 (MFI) の4つのクラシック技術指標を統合し,指標間のクロス検証によってより信頼性の高い取引を生成する.信号戦略は,設計上4時間の周期に特別に適合し,信号強度に応じて通常の信号と強い信号の2つのレベルに分けられる.
戦略の核心的な論理は,複数の指標の協調的な配合によって取引シグナルを確認することです.具体的には:
この戦略は,複数のクラシックな技術指標の協同分析によって,比較的信頼性の高い取引信号生成システムを構築している.戦略の設計は,実用性と維持性に重点を置くが,十分な最適化スペースを留めている.合理的なパラメータ調整と最適化方向の実施により,戦略は,実際の取引で安定したパフォーマンスを期待している.
/*backtest
start: 2024-12-10 00:00:00
end: 2025-02-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Clear Buy/Sell Signals with RSI, Bollinger Bands, IMI, and MFI", overlay=true)
// Input parameters
rsiLength = input.int(14, title="RSI Length")
bbLength = input.int(20, title="Bollinger Bands Length")
bbStdDev = input.float(2.0, title="Bollinger Bands Std Dev")
imiLength = input.int(14, title="IMI Length")
mfiLength = input.int(14, title="MFI Length")
// RSI Calculation
rsi = ta.rsi(close, rsiLength)
// Bollinger Bands Calculation
[bbUpper, bbMiddle, bbLower] = ta.bb(close, bbLength, bbStdDev)
// Intraday Momentum Index (IMI) Calculation
upSum = math.sum(close > open ? close - open : 0, imiLength)
downSum = math.sum(close < open ? open - close : 0, imiLength)
imi = (upSum / (upSum + downSum)) * 100
// Money Flow Index (MFI) Calculation
typicalPrice = (high + low + close) / 3
mfi = ta.mfi(typicalPrice, mfiLength)
// Buy/Sell Conditions
buyCondition = rsi < 30 and close < bbLower and imi < 30 and mfi < 20
sellCondition = rsi > 70 and close > bbUpper and imi > 70 and mfi > 80
// Strong Buy/Sell Conditions
strongBuyCondition = rsi < 20 and close < bbLower and imi < 20 and mfi < 10
strongSellCondition = rsi > 80 and close > bbUpper and imi > 80 and mfi > 90
// Plot Buy/Sell Signals
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", size=size.small)
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", size=size.small)
// Plot Strong Buy/Sell Signals
plotshape(series=strongBuyCondition, title="Strong Buy Signal", location=location.belowbar, color=color.lime, style=shape.labelup, text="STRONG BUY", size=size.normal)
plotshape(series=strongSellCondition, title="Strong Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="STRONG SELL", size=size.normal)
// Strategy Logic (for Backtesting)
if (buyCondition or strongBuyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition or strongSellCondition)
strategy.entry("Sell", strategy.short)