OPEN-SOURCE SCRIPT
Buy-Sell Indicator - Michael Fernandes

This indicator combines ATR-based trailing stops with EMA crossovers to generate clear buy and sell signals.
It adapts dynamically to market volatility using the Average True Range (ATR) and optionally computes signals from Heikin-Ashi candles for smoother trends.
How It Works:
1. ATR Trailing Stop: Calculates a dynamic stop level above or below price depending on trend direction.
2. EMA Confirmation: A 1-period EMA crossover with the trailing stop helps validate entries.
3. Buy Signal: Triggered when price crosses above the trailing stop and EMA confirms momentum.
4. Sell Signal: Triggered when price crosses below the trailing stop and EMA confirms reversal.
Inputs:
1. Key Value (a): Sensitivity multiplier (higher = tighter stop, more signals).
2. ATR Period (c): Length of ATR used to measure volatility.
3. Heikin-Ashi Mode (h): Option to use smoothed candle data for cleaner trends.
It adapts dynamically to market volatility using the Average True Range (ATR) and optionally computes signals from Heikin-Ashi candles for smoother trends.
How It Works:
1. ATR Trailing Stop: Calculates a dynamic stop level above or below price depending on trend direction.
2. EMA Confirmation: A 1-period EMA crossover with the trailing stop helps validate entries.
3. Buy Signal: Triggered when price crosses above the trailing stop and EMA confirms momentum.
4. Sell Signal: Triggered when price crosses below the trailing stop and EMA confirms reversal.
Inputs:
1. Key Value (a): Sensitivity multiplier (higher = tighter stop, more signals).
2. ATR Period (c): Length of ATR used to measure volatility.
3. Heikin-Ashi Mode (h): Option to use smoothed candle data for cleaner trends.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。