この戦略は,相対的に強い指数 ((RSI)) をベースに,純粋に多頭取引システムを設計した.このシステムは,RSIを異なる上下軌道に配置することで,RSI指標が金叉が発生したときに多頭し,死叉が発生したときに平仓を実現した.
この戦略は,主にRSI指標に依存して取引信号を生成する. RSI指標は,決算価格の上昇と下落の日の比率を一定周期で計算することによって,株式の超買い超売り状況を反映する. RSI値が高くても超買い,RSI値が低くても超売りを表す.
具体的には,戦略はRSIの複数のパラメータを設定して取引シグナルを生成します.
RSI値を計算した後,戦略は以下の原則で取引信号を生成します.
このように,複数のRSIを上下軌道に設定して,超買超売の領域間の金叉の死叉を捕捉することで,トレンド追跡が可能になります.
RSIに基づくトレンド追跡戦略は,以下の利点があります.
しかし,この戦略にはいくつかのリスクがあります.
これは,RSI周期パラメータを適切に調整し,平均線指標と組み合わせ,合理的な止損位置を設定することによって最適化することができます.
この戦略は,以下の点でさらに改善できます.
この戦略は,配置されたRSI技術指標を介して,簡単なトレンド追跡取引システムを実現します. 戦略のアイデアは明確で分かりやすく,自分の必要に応じてパラメータを調整できます. しかし,いくつかのリスクもあります. 注意を払う必要があります.
/*backtest
start: 2023-09-06 00:00:00
end: 2023-10-06 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version= 4
// https://sauciusfinance.altervista.org, another trading idea, suggested by the fact that RSI tends to accompany the trend
strategy(title="Pure RSI long only", overlay = true, max_bars_back=500)
// INPUTS
rsi_low = input(30, title ="RSI lower band", minval=5, step = 1)
rsi_middle = input(55, title ="RSI middle band", minval=10, step = 1)
rsi_mhigh = input(60, title ="RSI middle high", minval=20, step = 1)
rsi_high = input(70, title ="RSI high", minval=30, step = 1)
rsi_top = input(75, title ="RSI top", minval=30, step = 1)
rsi_period = input(14, title="RSI period", minval = 1, step = 1)
// CALCULATIONS
myrsi = rsi(close, rsi_period)
/// Entry: when RSI rises from the bottom or, after a retracement, it overcomes again the middle level of 50
strategy.entry("Long", true, when = crossover(myrsi,rsi_low))
strategy.entry("Long", true, when = crossover(myrsi,rsi_middle))
/// EXITS: when RSI crosses under the initial bottom level (stop loss) or undergoes one of the next 3 steps : 50, 60, 70 or it's simply
// higher than 70
// you may test viceversa for short, adding level of 40
strategy.close("Long", when = crossunder(myrsi, rsi_low), comment="low")
strategy.close("Long", when = crossunder(myrsi, rsi_middle), comment="middle")
strategy.close("Long", when = crossunder(myrsi, rsi_mhigh), comment="middle-hi")
strategy.close("Long", when = crossunder(myrsi, rsi_high), comment="high")
strategy.close("Long", when = (myrsi>rsi_top), comment="top")
plotchar(myrsi, title = "myrsi", char='+', color=color.black)
// CONCLUSION: this system give notable results related to MA & RSI trading system and it's a good alternative. The best is making
// roboadvisoring by working this two system togheter, i.e. watching both MA and levels of RSI together (you may also enter if RSI
// crosses over 30 and then wait for a confirm in MA)