高量低ブレイク 複合型ポジションサイズ戦略

作者: リン・ハーンチャオチャン,日付: 2024-02-18 15:43:02
タグ:

img

概要

この戦略の主な考え方は,定義されたリスクパーセントと250倍シミュレーションレバレッジに基づく複合ポジションサイジングアプローチを使用して,高取引量中のブレイクアウトを追跡することです.

戦略の論理

長期入口信号は次のとき起動します.

  1. 容量はユーザー定義の限界値を超えています (volThreshold)
  2. 現在のバーの低値が前のバーの低値より低い (lowLowThanPrevBar)
  3. 現在のバーの閉じる値はマイナスだが,前のバーの閉じる値より高い (マイナスCloseWithHighVolume)
  4. オープンロングポジションはありません (strategy.position_size == 0)

位置のサイズを以下のように計算する.

  1. リスク額 資本金に基づくリスク額 * リスクパーセント
  2. リスク額*レバレッジ (250倍)

出口規則

ロングポジションは,ProfitPctの利益率はストップ・ロスト (-0.14%) またはテイク・プロフィート (4.55%) に達すると閉じる.

利点分析

この戦略の利点:

  1. 高取引量によるトレンド逆転の機会を把握する
  2. 複合型ポジションのサイズ化により,利益の成長が早くなる
  3. 合理的なストップ・ロストと得益はリスクを制御するのに役立ちます

リスク分析

考慮すべきリスク:

  1. 250倍レバレッジは損失を増大させる
  2. 格差,手数料,手数料の要件を考慮しない
  3. 強力なバックテストとパラメータ最適化が必要です

リスクは以下によって軽減できます.

  1. レバレッジの額を下げる
  2. ストップ・ロスの増加率
  3. 現実世界での取引コストの会計

最適化 の 機会

改善すべき分野:

  1. 動的にレバレッジレベルを調整する
  2. ストップ・ロスの最適化と,利益を取ること
  3. トレンドフィルターを追加
  4. 計器に基づいてパラメータをカスタマイズする

結論

概要すると,これは逆転と大きな利益を捕捉するための比較的シンプルで直線的な戦略です. しかしリスクは存在し,慎重な現実世界のテストは不可欠です.最適化によって,より堅牢で実用化することができます.


/*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")


もっと