OPEN-SOURCE SCRIPT

Buy-Sell Indicator - Michael Fernandes

462
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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.