これは,RSI (Relative Strength Index) 指標に基づいた短期取引戦略です.これは,市場における潜在的な強みと弱さを特定するためにRSIを使用し,それによって取引決定を支援します.
この戦略は,短期的な価格動向を把握するために5期間のRSIを使用します.これは,RSI曲線のピークと低点に基づいてエントリーとストップ損失レベルを決定します.
長期入場条件:以前のキャンドルのRSIは50以下,現在のキャンドルのRSIは60以上.
出口条件:RSI曲線が低低値に達し,弱まる傾向を示し,ロングポジションを閉じる.
オプティマイズ
この戦略は,明確なロングエントリーとストップロスのルールを設定するために,RSIピークと低谷の逆転パターンを利用する.論理はシンプルで実用的であるが,いくつかの不安定性がある. 戦略の安定性はパラメータ最適化と指標組み合わせによって改善することができる.
/*backtest start: 2024-01-14 00:00:00 end: 2024-01-21 00:00:00 period: 30m basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("*RSI 5 - Long only- Daily charts & above*", overlay = false) // Define inputs rsi_length = input(5, "RSI Length") // Calculate indicators rsi = ta.rsi(close, rsi_length) // Entry conditions long = rsi[1] < 50 and rsi > 60 // Exit conditions longExit = rsi < rsi[1] // Execute trade with adjusted position size if (long) strategy.entry("Long", strategy.long) if (longExit) strategy.close("LongExit") // Close long position if long exit condition is met if (longExit) strategy.close("Long", comment="Long exit") rsiPlot = plot(rsi, "RSI", color=#7E57C2) rsiUpperBand = hline(60, "RSI Upper Band", color=#787B86) midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50)) rsiLowerBand = hline(40, "RSI Lower Band", color=#787B86) fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="RSI Background Fill")