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. اقرأ المزيد في شروط الاستخدام.