
この戦略は,ブリン帯 (Bollinger Bands) と比較的強い指標 (RSI) を組み合わせた技術分析取引システムである.これは,価格の変動と市場の動力の特性を主に利用し,オーバーバイオーバーセール領域で取引の機会を探している.この戦略は,RSI指標がオーバーバイ (Bollinger Bands) を30以下で,価格がブリン帯を突破して下線したときに買入シグナルを生成する.RSI指標がオーバーバイ (Bollinger Bands) を70以上で,価格がブリン帯を突破して上線したときに売り出シグナルを生成する.同時に,ブリン帯の軌道で損失位置として使用する.
戦略の中核となるロジックは、次の主要な要素に基づいています。
この戦略は,ブリン帯とRSI指標を組み合わせて,比較的完全な取引システムを構築している.戦略の論理は明確で,リスク管理は合理的で,実用的な価値がある.推奨された最適化方向によって,戦略はさらに向上する余地がある.実際の適用では,投資家が自身のリスク承受能力と市場環境に応じて適切な調整を行うことを推奨している.
/*backtest
start: 2024-07-15 00:00:00
end: 2025-02-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BNB_USDT"}]
*/
//@version=5
strategy("Bollinger Bands + RSI Strategy", overlay=true)
// Bollinger Bands parameters
length = input.int(20, title="Bollinger Bands Length")
src = input(close, title="Source")
mult = input.float(2.0, title="Bollinger Bands Multiplier")
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upper_band = basis + dev
lower_band = basis - dev
// RSI parameters
rsi_length = input.int(14, title="RSI Length")
rsi = ta.rsi(src, rsi_length)
// Plot Bollinger Bands
plot(upper_band, color=color.red, linewidth=2, title="Upper Bollinger Band")
plot(lower_band, color=color.green, linewidth=2, title="Lower Bollinger Band")
plot(basis, color=color.blue, linewidth=1, title="Middle Band")
// Buy Condition
buy_condition = ta.crossover(close, lower_band) and rsi < 30
if buy_condition
strategy.entry("Buy", strategy.long)
// Sell Condition
sell_condition = ta.crossunder(close, upper_band) and rsi > 70
if sell_condition
strategy.entry("Sell", strategy.short)
// Exit Conditions (optional: use the middle Bollinger Band for exits)
exit_condition = ta.cross(close, basis)
if exit_condition
strategy.close("Buy")
strategy.close("Sell")
// Optional: Plot RSI for additional insight
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
plot(rsi, color=color.purple, title="RSI", linewidth=1, offset=-5)