
Chiến lược này sử dụng chỉ số RSI để đo đạc động lực giá, xác định thời gian nhập cảnh bằng cách tính toán chênh lệch chuẩn của sự thay đổi RSI. Khi RSI vượt quá ngưỡng chênh lệch chuẩn và ít hơn động lực trước đó nhân với yếu tố suy thoái, hãy mở nhiều vị trí, thay vào đó, mở một vị trí trống. Chiến lược này sử dụng vị trí đơn giá giới hạn, kiểm soát rủi ro bằng cách thiết lập số điểm dừng và dừng lỗ.
Chiến lược này sử dụng động lực RSI và ngưỡng chênh lệch tiêu chuẩn để giao dịch đảo ngược trong môi trường tần số cao. Bằng cách giới thiệu yếu tố suy thoái và giá tròn, chiến lược có thể nắm bắt cơ hội giao dịch do biến động giá trong khi kiểm soát rủi ro. Tuy nhiên, chiến lược vẫn cần được tối ưu hóa hơn nữa trong ứng dụng thực tế, chẳng hạn như giới thiệu nhiều chỉ số, thiết lập tham số tối ưu, quản lý vị trí và lọc xu hướng để tăng sự ổn định và khả năng lợi nhuận của chiến lược.
/*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)