
이 전략은 RSI 지표를 사용하여 가격 움직임을 측정하고, RSI 변화의 표준 차이를 계산하여 진입 시점을 결정한다. RSI 움직임이 표준 차점 임계 값을 초과하고 전 순간의 움직임이 실패 인자에 곱하면 더 많은 포지션을 열고, 반대로 포지션을 열는다. 이 전략은 제한 가격 평평 포지션을 사용하여, 스톱 스톱과 스톱 손실 포인트를 설정하여 위험을 제어한다. 전략은 모든 잠재적인 가격 변동을 포착하기 위해 각 가격 변화에 따라 실행된다.
이 전략은 RSI 동력과 표준 차치 하락값을 활용하여 고주파 환경에서 역전 거래한다. 실패 인자 및 제한 가격 평평 포지션을 도입함으로써, 전략은 위험을 제어하면서 가격 변동으로 인한 거래 기회를 잡을 수 있다. 그러나, 전략은 실제 응용에서 더 많은 지표, 최적화된 매개 변수 설정, 포지션 관리 및 트렌드 필터링 등을 도입하는 것과 같은 추가적인 최적화가 필요합니다. 전략의 안정성과 수익성을 높이기 위해.
/*backtest
start: 2024-03-01 00:00:00
end: 2024-03-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("MCOTs Intuition Strategy", overlay=true, default_qty_type=strategy.fixed, default_qty_value=1, initial_capital=50000, calc_on_every_tick=true)
// Input for RSI period
rsiPeriod = input(14, title="RSI Period")
// Input for standard deviation multiplier
stdDevMultiplier = input(1.0, title="Standard Deviation Multiplier")
// Input for exhaustion detection
exhaustionMultiplier = input(1.5, title="Exhaustion Multiplier")
// Input for profit target and stop loss in ticks
profitTargetTicks = input(8, title="Profit Target (ticks)")
stopLossTicks = input(32, title="Stop Loss (ticks)")
// Calculate RSI
rsiValue = ta.rsi(close, rsiPeriod)
// Calculate standard deviation of RSI changes
rsiStdDev = ta.stdev(ta.change(rsiValue), rsiPeriod)
// Calculate momentum
momentum = ta.change(rsiValue)
// Conditions for entering a long position
longCondition = momentum > rsiStdDev * stdDevMultiplier and momentum < momentum[1] * exhaustionMultiplier
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit Long", "Long", limit=close + profitTargetTicks * syminfo.mintick)
strategy.exit("Stop Loss Long", "Long", stop=close - stopLossTicks * syminfo.mintick)
// Conditions for entering a short position
shortCondition = momentum < -rsiStdDev * stdDevMultiplier and momentum > momentum[1] * exhaustionMultiplier
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit Short", "Short", limit=close - profitTargetTicks * syminfo.mintick)
strategy.exit("Stop Loss Short", "Short", stop=close + stopLossTicks * syminfo.mintick)
// Plotting RSI value for reference
plot(rsiValue, title="RSI", color=color.blue)