
この戦略は,相対的に強い指数 ((RSI) と移動平均の収束散度 ((MACD) の指標に基づく仮想通貨の高周波取引戦略である. それは,2つの異なる周期の移動平均 ((MA) を使ってトレンドを判断し,RSIとMACDの指標を組み合わせて入場と出場シグナルを確認する. この戦略は,低リスクで安定した利益を達成することを目的としている.
この戦略は,MA,RSI,MACD指標に基づく高周波取引戦略であり,厳しいシグナル確認とストップの条件によって,トレンド型市場で安定した低リスクの利益を得ることができます.しかし,振動的な市場では,頻繁に取引の問題に直面する可能性があります.同時に,シグナル遅滞の危険もあります.将来,最適化パラメータ,ダイナミックなポジション管理,多要素モデルなどの観点から,戦略を最適化することができ,適応性と利益リスク比率が向上します.
/*backtest
start: 2023-04-06 00:00:00
end: 2024-04-11 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Scalping Amélioré avec RSI et MACD", overlay=true)
// Paramètres des indicateurs
fastLength = input(9, title="Longueur MA Rapide")
slowLength = input(21, title="Longueur MA Lente")
rsiLength = input(14, title="Longueur RSI")
macdFast = input(12, title="MACD Rapide")
macdSlow = input(26, title="MACD Lent")
macdSignal = input(9, title="Signal MACD")
// Calcul des indicateurs
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)
rsi = ta.rsi(close, rsiLength)
[macdLine, signalLine, _] = ta.macd(close, macdFast, macdSlow, macdSignal)
// Conditions d'entrée
longCondition = ta.crossover(fastMA, slowMA) and rsi > 50 and macdLine > signalLine
if (longCondition)
strategy.entry("Long", strategy.long)
// Conditions de sortie
exitCondition = ta.crossunder(fastMA, slowMA) or rsi < 50 or macdLine < signalLine
if (exitCondition)
strategy.close("Long")
// Affichage des indicateurs
plot(fastMA, color=color.red, title="MA Rapide")
plot(slowMA, color=color.blue, title="MA Lente")
hline(50, "Niveau 50 RSI", color=color.orange)