
이 전략은 상대적으로 약한 지수 ((RSI) 와 이동 평균의 수렴 분산 ((MACD) 지표에 기반한 암호화폐의 고주파 거래 전략이다. 그것은 두 개의 다른 기간의 이동 평균 ((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)