
Это продвинутая количественная торговая стратегия, которая сочетает в себе индикатор супертренда и анализ объема торгов. Стратегия идентифицирует потенциальные переломные моменты в тренде путем динамического мониторинга пересечения цены с линией супертренда и аномального поведения объема торгов. Стратегия использует динамические параметры стоп-поста и прибыли, основанные на реальном диапазоне волн (ATR), что обеспечивает гибкость торговли и надежность управления рисками.
Основная логика стратегии основана на следующих ключевых элементах:
Стратегия, объединяя сверхтрендовые показатели с анализом объема торгов, создает надежную и адаптивную торговую систему. Преимущества стратегии заключаются в многомерности подтверждения сигналов и динамичности управления рисками, но все же следует обращать внимание на влияние рыночной среды на эффективность стратегии.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-11 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Supertrend with Volume Strategy", overlay=true)
// Input parameters for Supertrend
atrLength = input(10, title="ATR Length")
multiplier = input(3.0, title="Multiplier")
// Calculate Supertrend
[supertrend, direction] = ta.supertrend(multiplier, atrLength)
// Plot Supertrend
plot(supertrend, color=direction == 1 ? color.green : color.red, title="Supertrend")
// Volume condition
volumeThreshold = input(1.5, title="Volume Threshold (x Average)")
avgVolume = ta.sma(volume, 20) // 20-period average volume
highVolume = volume > (avgVolume * volumeThreshold)
// Define entry conditions
longCondition = ta.crossover(close, supertrend) and highVolume
shortCondition = ta.crossunder(close, supertrend) and highVolume
// Execute trades
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Optional: Add stop loss and take profit
stopLoss = input(1.5, title="Stop Loss (in ATRs)")
takeProfit = input(3.0, title="Take Profit (in ATRs)")
if (longCondition)
strategy.exit("Take Profit/Stop Loss", from_entry="Long",
limit=close + (takeProfit * ta.atr(atrLength)),
stop=close - (stopLoss * ta.atr(atrLength)))
if (shortCondition)
strategy.exit("Take Profit/Stop Loss", from_entry="Short",
limit=close - (takeProfit * ta.atr(atrLength)),
stop=close + (stopLoss * ta.atr(atrLength)))