本策略的核心思想是在高交易量的情况下追踪突破,通过设置风险预算百分比和250倍的模拟杠杆来实现复利仓位。它旨在抓住高卖压后的潜在反转机会。
当满足以下条件时,做多入场:
仓位大小的计算方法是:
退出原则:
多头仓位盈亏百分比 posProfitPct 触碰止损线(-0.14%)或止盈线(4.55%)时平仓。
这种策略的优势在于:
该策略也存在一些风险:
可通过以下方法降低风险:
该策略可以从以下几个方面进行优化:
本策略总体来说较为简单直接,通过捕捉反转机会获取超额收益。但也存在一定风险,需要谨慎实盘验证。通过参数和策略结构优化,可以使其更稳定、实战性更强。
/*backtest start: 2023-02-11 00:00:00 end: 2024-02-17 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("High Volume Low Breakout (Compounded Position Size)", overlay=true, initial_capital=1000) // Define input for volume threshold volThreshold = input.int(250, "Volume Threshold") // Define input for risk per trade as a percentage of total equity riskPercentage = input.float(10, "Risk Percentage") // Calculate volume vol = volume // Check for high volume and low lower than the previous bar highVolume = vol > volThreshold lowLowerThanPrevBar = low < low[1] // Calculate position profit percentage posProfitPct = 100 * (close - strategy.position_avg_price) / strategy.position_avg_price // Calculate the position size based on risk percentage and total account equity equity = strategy.equity riskAmount = (equity * riskPercentage / 100) / (close - strategy.position_avg_price) // Calculate leverage (250x in this case) leverage = 250 // Calculate the position size in contracts/lots to trade positionSize = riskAmount * leverage // Check if the current bar's close is negative when it has high volume negativeCloseWithHighVolume = highVolume and close < close[1] // Enter long position as soon as volume exceeds the threshold, low is lower than the previous bar, and the current bar's close is negative if highVolume and lowLowerThanPrevBar and negativeCloseWithHighVolume and strategy.position_size == 0 strategy.entry("Long", strategy.long, qty=positionSize, comment="Long Entry") // Exit long position intrabar if profit goes below -0.14% or above 1% if strategy.position_size > 0 if posProfitPct < -0.14 or posProfitPct > 4.55 strategy.close("Long")