OPEN-SOURCE SCRIPT
更新済 Dual Smoothed Heiken Ashi

this pine script creates a sophisticated trading indicator called "dual smoothed heiken ashi" that combines traditional heiken ashi candlesticks with advanced smoothing techniques to generate cleaner trading signals. the indicator displays both on the main chart and in a separate subchart, offering multiple customization options for different trading styles.
the core concept revolves around smoothed heiken ashi candlesticks that reduce market noise through a dual-stage exponential moving average process similar to tema (triple exponential moving average). this smoothing helps eliminate false signals while maintaining responsiveness to genuine trend changes.
the indicator offers three preset configurations: "3-10" for highly sensitive short-term trading, "10-20" for balanced intraday trading, and "20-50" for stable longer-term trend following. these presets automatically adjust the smoothing periods to match different trading timeframes and risk preferences.
signal generation combines three distinct conditions that traders can enable or disable independently. the trend change condition requires the smoothed heiken ashi to flip from bearish to bullish (buy signal) or bullish to bearish (sell signal). the pullback condition waits for price to touch the smoothed heiken ashi levels, ensuring better entry timing. the engulfing pattern condition offers three modes: strict (complete engulfing pattern), relaxed (close price engulfing only), and directional (simple direction change).
visual features include customizable background colors for both main and sub charts that change based on trend direction - green for uptrends and red for downtrends. signal markers appear as triangular shapes with "buy" and "sell" labels, displayed simultaneously on both the main price chart and the indicator subchart for easy identification.
the subchart displays the smoothed heiken ashi candlesticks in their traditional form - green candles during uptrends and red candles during downtrends. this provides a clean, noise-reduced view of market direction compared to regular price action.
traders can customize the indicator extensively through input parameters. they can toggle signal display, background colors, and individual signal conditions. the engulfing pattern detection offers flexibility through its three modes, allowing traders to adjust signal frequency based on their risk tolerance.
alert functionality is built-in, sending json-formatted messages that include action type, symbol, current price, and trend direction. this enables automated trading system integration or simply provides timely notifications of signal occurrences.
for practical use, traders typically start with the balanced "10-20" preset and enable all three signal conditions using the relaxed engulfing mode. this configuration provides a good balance between signal quality and frequency. short-term traders might prefer the "3-10" preset for more frequent signals, while position traders could use "20-50" for stronger trend confirmation.
the indicator works best in trending markets and may produce false signals during choppy, sideways price action. combining it with other technical analysis tools like support/resistance levels or volume indicators can improve overall trading performance.
---
このpineスクリプトは「dual smoothed heiken ashi」という高度なトレーディングインジケーターを作成し、従来の平均足に高度な平滑化技術を組み合わせてより清潔な売買シグナルを生成します。メインチャートと独立したサブチャートの両方に表示され、異なるトレーディングスタイルに対応する複数のカスタマイズオプションを提供します。
核となる概念は、tema(三重指数移動平均)に類似した二段階指数移動平均プロセスを通じて市場ノイズを減少させる平滑化された平均足ローソク足です。この平滑化処理により偽シグナルを排除しながら、真のトレンド変化に対する反応性を維持します。
インジケーターは3つのプリセット設定を提供します:高感度短期取引向けの「3-10」、バランス型日中取引向けの「10-20」、安定した長期トレンドフォロー向けの「20-50」です。これらのプリセットは異なる取引時間軸とリスク選好に合わせて平滑化期間を自動調整します。
シグナル生成は、トレーダーが個別に有効・無効を切り替えできる3つの異なる条件を組み合わせます。トレンド転換条件は平滑化平均足が弱気から強気(買いシグナル)または強気から弱気(売りシグナル)に転換することを要求します。プルバック条件は価格が平滑化平均足レベルに触れるのを待ち、より良いエントリータイミングを確保します。包み足パターン条件は3つのモードを提供:厳密版(完全な包み足パターン)、緩和版(終値のみの包み込み)、方向性のみ(単純な方向転換)です。
視覚的機能には、トレンド方向に基づいて変化するメインチャートとサブチャート両方のカスタマイズ可能な背景色が含まれます。上昇トレンドでは緑、下降トレンドでは赤になります。シグナルマーカーは「buy」と「sell」ラベル付きの三角形として表示され、簡単な識別のためメイン価格チャートとインジケーターサブチャートの両方に同時表示されます。
サブチャートは平滑化された平均足ローソク足を従来の形式で表示します。上昇トレンド中は緑のローソク足、下降トレンド中は赤のローソク足となり、通常の価格アクションと比較してノイズが減少したクリーンな市場方向の視点を提供します。
トレーダーは入力パラメーターを通じてインジケーターを広範囲にカスタマイズできます。シグナル表示、背景色、個別のシグナル条件を切り替えることができます。包み足パターン検出は3つのモードを通じて柔軟性を提供し、リスク許容度に基づいてシグナル頻度を調整できます。
アラート機能が組み込まれており、アクションタイプ、シンボル、現在価格、トレンド方向を含むjson形式のメッセージを送信します。これにより自動取引システム統合や単純にシグナル発生のタイムリーな通知が可能になります。
実用的な使用では、トレーダーは通常バランス型の「10-20」プリセットから始め、緩和版包み足モードを使用して3つのシグナル条件すべてを有効にします。この設定はシグナル品質と頻度の良いバランスを提供します。短期トレーダーはより頻繁なシグナルのため「3-10」プリセットを好む可能性があり、ポジショントレーダーはより強いトレンド確認のため「20-50」を使用できます。
このインジケーターはトレンド市場で最も良く機能し、変動の激しい横ばい価格アクション中は偽シグナルを生成する可能性があります。サポート・レジスタンスレベルやボリュームインジケーターなどの他のテクニカル分析ツールと組み合わせることで、全体的なトレーディングパフォーマンスを向上させることができます。
the core concept revolves around smoothed heiken ashi candlesticks that reduce market noise through a dual-stage exponential moving average process similar to tema (triple exponential moving average). this smoothing helps eliminate false signals while maintaining responsiveness to genuine trend changes.
the indicator offers three preset configurations: "3-10" for highly sensitive short-term trading, "10-20" for balanced intraday trading, and "20-50" for stable longer-term trend following. these presets automatically adjust the smoothing periods to match different trading timeframes and risk preferences.
signal generation combines three distinct conditions that traders can enable or disable independently. the trend change condition requires the smoothed heiken ashi to flip from bearish to bullish (buy signal) or bullish to bearish (sell signal). the pullback condition waits for price to touch the smoothed heiken ashi levels, ensuring better entry timing. the engulfing pattern condition offers three modes: strict (complete engulfing pattern), relaxed (close price engulfing only), and directional (simple direction change).
visual features include customizable background colors for both main and sub charts that change based on trend direction - green for uptrends and red for downtrends. signal markers appear as triangular shapes with "buy" and "sell" labels, displayed simultaneously on both the main price chart and the indicator subchart for easy identification.
the subchart displays the smoothed heiken ashi candlesticks in their traditional form - green candles during uptrends and red candles during downtrends. this provides a clean, noise-reduced view of market direction compared to regular price action.
traders can customize the indicator extensively through input parameters. they can toggle signal display, background colors, and individual signal conditions. the engulfing pattern detection offers flexibility through its three modes, allowing traders to adjust signal frequency based on their risk tolerance.
alert functionality is built-in, sending json-formatted messages that include action type, symbol, current price, and trend direction. this enables automated trading system integration or simply provides timely notifications of signal occurrences.
for practical use, traders typically start with the balanced "10-20" preset and enable all three signal conditions using the relaxed engulfing mode. this configuration provides a good balance between signal quality and frequency. short-term traders might prefer the "3-10" preset for more frequent signals, while position traders could use "20-50" for stronger trend confirmation.
the indicator works best in trending markets and may produce false signals during choppy, sideways price action. combining it with other technical analysis tools like support/resistance levels or volume indicators can improve overall trading performance.
---
このpineスクリプトは「dual smoothed heiken ashi」という高度なトレーディングインジケーターを作成し、従来の平均足に高度な平滑化技術を組み合わせてより清潔な売買シグナルを生成します。メインチャートと独立したサブチャートの両方に表示され、異なるトレーディングスタイルに対応する複数のカスタマイズオプションを提供します。
核となる概念は、tema(三重指数移動平均)に類似した二段階指数移動平均プロセスを通じて市場ノイズを減少させる平滑化された平均足ローソク足です。この平滑化処理により偽シグナルを排除しながら、真のトレンド変化に対する反応性を維持します。
インジケーターは3つのプリセット設定を提供します:高感度短期取引向けの「3-10」、バランス型日中取引向けの「10-20」、安定した長期トレンドフォロー向けの「20-50」です。これらのプリセットは異なる取引時間軸とリスク選好に合わせて平滑化期間を自動調整します。
シグナル生成は、トレーダーが個別に有効・無効を切り替えできる3つの異なる条件を組み合わせます。トレンド転換条件は平滑化平均足が弱気から強気(買いシグナル)または強気から弱気(売りシグナル)に転換することを要求します。プルバック条件は価格が平滑化平均足レベルに触れるのを待ち、より良いエントリータイミングを確保します。包み足パターン条件は3つのモードを提供:厳密版(完全な包み足パターン)、緩和版(終値のみの包み込み)、方向性のみ(単純な方向転換)です。
視覚的機能には、トレンド方向に基づいて変化するメインチャートとサブチャート両方のカスタマイズ可能な背景色が含まれます。上昇トレンドでは緑、下降トレンドでは赤になります。シグナルマーカーは「buy」と「sell」ラベル付きの三角形として表示され、簡単な識別のためメイン価格チャートとインジケーターサブチャートの両方に同時表示されます。
サブチャートは平滑化された平均足ローソク足を従来の形式で表示します。上昇トレンド中は緑のローソク足、下降トレンド中は赤のローソク足となり、通常の価格アクションと比較してノイズが減少したクリーンな市場方向の視点を提供します。
トレーダーは入力パラメーターを通じてインジケーターを広範囲にカスタマイズできます。シグナル表示、背景色、個別のシグナル条件を切り替えることができます。包み足パターン検出は3つのモードを通じて柔軟性を提供し、リスク許容度に基づいてシグナル頻度を調整できます。
アラート機能が組み込まれており、アクションタイプ、シンボル、現在価格、トレンド方向を含むjson形式のメッセージを送信します。これにより自動取引システム統合や単純にシグナル発生のタイムリーな通知が可能になります。
実用的な使用では、トレーダーは通常バランス型の「10-20」プリセットから始め、緩和版包み足モードを使用して3つのシグナル条件すべてを有効にします。この設定はシグナル品質と頻度の良いバランスを提供します。短期トレーダーはより頻繁なシグナルのため「3-10」プリセットを好む可能性があり、ポジショントレーダーはより強いトレンド確認のため「20-50」を使用できます。
このインジケーターはトレンド市場で最も良く機能し、変動の激しい横ばい価格アクション中は偽シグナルを生成する可能性があります。サポート・レジスタンスレベルやボリュームインジケーターなどの他のテクニカル分析ツールと組み合わせることで、全体的なトレーディングパフォーマンスを向上させることができます。
リリースノート
調整オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。