この戦略は,RSI指標の均線回帰特性をベースに設計されている。RSI指標を上回る時,反転が起こり,取引機会が形成されます。この戦略は,RSI指標を介して,超買い超売り状態を判断し,均線回帰の方法で多空ポジションを確立し,システム化取引の目的を達成します。
戦略の原則:
RSI指標値を計算し,超買線と超売り線を設定します.典型的なパラメータは,超買線60と超売り線30です.
RSIが上から下へと上昇し,超買い線を突破すると,売り込みを行い,ショートポジションを設定します.
RSIが上下から超セールラインを突破すると,買入操作を行い,多ポジションを確立する.
多ポジションのストップラインは入場価格の倍数 ((1-ストップ比率),ショートポジションのストップラインは入場価格の倍数 ((1+ストップ比率) である.
価格がストップラインを突破すると,ストップアウトを行う.
この戦略の利点は以下の通りです.
RSIの逆転特性を利用して,順次トレンドの逆転がもたらす取引機会を捉えることができます.
突破型の投資策により,トレンドの転換を把握できます.
ストップ・ローンを設定して,単一損失をコントロールできます.
この戦略のリスクは以下の通りです.
RSIは偽信号を発する可能性が高いので,他の指標と組み合わせて確認してください.
入場点に近いストップポイントは,頻繁にストップされるので,適切なストップ範囲を放宽する必要があります.
返戻のタイミングを誤った選択は,長期の保有期間に繋がる可能性があります.
要するに,RSI均線回帰戦略は,RSI指標の回帰の機会を捕捉して取引する.この戦略は順番を順番に,単一の損失を効果的に制御することができる.しかし,RSI指標の信頼性は低いため,投資家は慎重に採用し,他の技術指標で確認し,長期にわたって安定した収益を得るために,損失停止機構を最適化するために補助する必要があります.
/*backtest
start: 2022-09-05 00:00:00
end: 2023-09-11 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © relevantLeader16058
//@version=4
strategy(shorttitle='RSI Bot Strategy',title='Quadency Mean Reversion Bot Strategy', overlay=true, initial_capital = 100, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, commission_type=strategy.commission.percent, commission_value=0.08)
//Backtest dates
start = input(defval = timestamp("08 Mar 2021 00:00 -0600"), title = "Start Time", type = input.time)
finish = input(defval = timestamp("9 Mar 2021 23:59 -0600"), title = "Start Time", type = input.time)
window() => true // create function "within window of time"
// Complete Control over RSI inputs and source price calculations
lengthRSI = input(14, minval=1)
source = input(title="Source", type=input.source, defval=close)
strat = input(title="Strategy", defval="Long/Short", options=["Long Only", "Long/Short", "Short Only"])
strat_val = strat == "Long Only" ? 1 : strat == "Long/Short" ? 0 : -1
stoploss = input(5.00, "Stop Loss %")
oversold= input(30)
overbought= input(60)
// Standard RSI Calculation
RSI = rsi(close, lengthRSI)
stLossLong=(1-(stoploss*.01))
stLossShort=(1+(stoploss*.01))
//Long and Short Strategy Logic
GoLong = crossunder(RSI, oversold) and window()
GoShort = crossover(RSI, overbought) and window()
// Strategy Entry and Exit
if (GoLong)
if strat_val > -1
strategy.entry("LONG", strategy.long)
if strat_val < 1
strategy.close("SHORT")
if (GoShort)
if strat_val > -1
strategy.close("LONG")
if strat_val < 1
strategy.entry("SHORT", strategy.short)
LongStopLoss = barssince(GoLong)<barssince(GoShort) and crossunder(low, valuewhen(GoLong, close, 0)*stLossLong)
ShortStopLoss = barssince(GoLong)>barssince(GoShort) and crossover(high, valuewhen(GoShort, close, 0)*stLossShort)
if (ShortStopLoss)
strategy.close("SHORT")
if (LongStopLoss)
strategy.close("LONG")