2. 7. 2025

5 0

ハーフ・トレンド・ボリンジャー・バンド (HTBB)

その HalfTrend Bollinger Bands indicator combines the trend-following capabilities of the HalfTrend indicator with volatility-based Bollinger Bands to provide enhanced trend analysis with dynamic support and resistance levels. This indicator creates a sophisticated approach to trend identification by applying statistical bands around a trend-following baseline.

仕組み

インジケーターは主に2つの段階で動作します:

  1. HalfTrend Calculation: Uses ATR-based trailing stops to identify trend direction and provide a dynamic trend line that follows price movements while filtering out minor fluctuations.
  2. ボリンジャーバンドの活用法: Calculates standard deviation of the HalfTrend values and creates upper and lower bands around the trend line using a specified deviation multiplier.

The HalfTrend algorithm tracks trend direction by maintaining trailing stops based on ATR volatility measurements. When price breaks these trailing levels, the trend direction reverses, providing a smooth trend-following signal that adapts to market volatility.

パラメータ

このインジケーターは以下のパラメータを受け付けます:

  • AtrLength (default: 10) – Period for Average True Range calculation used in trend detection
  • Amplitude (default: 2) – Multiplier for ATR values to determine trailing stop sensitivity
  • 偏差 (default: 2) – Standard deviation multiplier for band calculation around HalfTrend

出力

インジケーターは2つの出力生成します:

  • (Red) – Upper volatility band above HalfTrend line
  • 下げる (Green) – Lower volatility band below HalfTrend line

実装詳細

The indicator calculates ATR using the traditional method:

TrueRange = Max(High-Low, |High-PrevClose|, |Low-PrevClose|)

The HalfTrend algorithm maintains two key tracking values:

  • maxLowPrice: Trailing stop for uptrends (tracks highest low)
  • minHighPrice: Trailing stop for downtrends (tracks lowest high)

Trend reversal occurs when:

  • Uptrend to Downtrend: Close < (maxLowPrice – Amplitude × ATR)
  • Downtrend to Uptrend: Close > (minHighPrice + Amplitude × ATR)

ボリンジャーバンドは次のように計算されます:

  • アッパーバンド = HalfTrend + (Deviation × StandardDeviation)
  • 下限バンド = HalfTrend – (Deviation × StandardDeviation)

パラメータセット

Five optimized parameter sets are included:

  1. Fast: AtrLength=10, Amplitude=2, Deviation=2
  2. 標準: AtrLength=14, Amplitude=2, Deviation=2
  3. Balanced: AtrLength=20, Amplitude=3, Deviation=2.5
  4. 保守的: AtrLength=30, Amplitude=4, Deviation=2
  5. 長期: AtrLength=50, Amplitude=5, Deviation=2

使用方法

このインジケーターは以下の用途に使用できます:

  • Identify trend direction based on HalfTrend positioning and band interaction
  • 上限バンドと下限バンドを使用して動的なサポートおよびレジスタンスレベルを決定する
  • Spot potential trend reversal points when price approaches or breaks through bands
  • Assess trend strength based on the distance between bands (wider bands indicate higher volatility)
  • Generate entry signals when price breaks above upper band (bullish) or below lower band (bearish)

The combination of trend-following HalfTrend with volatility bands provides a more comprehensive analysis tool compared to using either component independently, offering both directional bias and volatility context for trading decisions.

インジケーターの可用性
このインジケーターは、MT4、MT5、TradeStation、MultiChartsに対応しています。.

条件分岐にカスタムブロックを使用する:
StrategyQuant X では、以下を使用して独自の条件を簡単に定義できます。 カスタムブロック. これにより、期間やステップなどのパラメータを設定して、戦略に合わせてインジケーターを微調整することができます。詳細については、以下のリソースを参照してください:

SQXへのカスタムインジケーターのインポート:
StrategyQuant Xにカスタム指標をインポートするには、こちらに記載されている手順に従ってください:
カスタムインジケーターやその他のスニペットのインポートとエクスポート

 

あなたは私をクロネックスとして知っている。. 私はアイヴァン・ハデックです。ここで使用されている無料のブロックを作成し、その背景にある研究について以下の場所で執筆しています: algotrading.space. 何か作りますか? 一緒に働きましょう.
0 コメント
最古の
最新 最も投票された